I am trying to model the variance in overall species richness with the habitat covariates of a camera trapping station using R2jags. However, I keep getting the error:
"Error in jags.model(model.file, data = data, inits = init.values, n.chains =…
I am trying to obtain a posterior predictive distribution for specified values of x from a simple linear regression in Jags. I could get the regression itself to work by adapting this example (from…
I'm running a large number of JAGS models in R using the jags function of the R2jags package (which uses the rjags package to run JAGS).
I get a lot of warnings printed in the console:
value out of range in 'lgamma'
Printing these warnings seems…
Cannot for the life of me get R2jags to run. I have tried all different versions of rjags, JAGS, R... each time I get the same error:
.onLoad failed in loadNamespace() for 'rjags'
All of the other files in the R2jags package loads just fine...
I feel very confused with the following syntax in jags, for example,
n.iter=100,000
thin=100
n.adapt=100
update(model,1000,progress.bar = "none")
Currently I think
n.adapt=100 means you set the first 100 draws as burn-in,
n.iter=100,000 means the…
I had a weird problem using JAGS for Bayesian data analysis.
Say in a loop, I have
for (i in 1:10) {
A[i] <- B[i]*exp(-C[i])
}
whenever C[i] is large and results in exp(-C[i]) smaller than 10^-16, A[i] takes the value of A[i-1].
It looks like…
I'd like to use Jags plus R to adjust a linear model with observable quantities, and make inference about unobservable ones. I found lots of example on the internet about how to adjust the model, but nothing on how to extrapolate its coefficients…
I have a beta-binomial model like this
where $B$ is the beta function.
I want to estimate the parameters $\theta_1,\theta_2,\ldots,\theta_5$.
I used a Maximum likelihood method:
BBlikelihood = function(theta){
k =…
I was told to use Bayesian inference instead of working only analytically with polling data. However, I have a problem; I have a small dataset with guesses about prior distributions for the parties, and I have data from polls. How can I obtain…
I am trying to build a GARCH(1,1) model in JAGS, and for simplicity let's assume that the mean equation follows the AR(1) process. I am trying to build 1 JAGS model that will allow joining the AR(1), and GARCH(1,1) processes.
For now I can only…
I just updated Rstudio (2023.03.0 Build 386) and R (R version 4.2.3 (2023-03-15 ucrt) -- "Shortstop Beagle"). I am trying to install rjags, R2jags, and simmR. Everything else is dependent on rjags.
When intstalling rjags I get the error:
Error:…
I am running Bayesian Hierarchical Modeling in R using R2jags. When I open code I used a month ago and run it on a dataset I used a month ago (verified by "date modified" in windows explorer), I get different results than I got a month ago. The only…
I found some bayesian paper try to draw the scatter plot matrix for the parameters.
I just wondering what is the goal to draw this scatter plot matrix?
what is the meaning if I see some linear or nonlinear relationships between samples.
Thanks
I am running a Hierarchical model one of the parameter's traceplot looks like this
First question is that is it converge?
Second question is that is it because the size of the data set is too small? I just have 8 data points
third question is why…
I am using Bayesian zero-altered (hurdle) Poisson or negative binomial model using R2jags. Because the ACF of the Pearson residuals showed autocorrelation, I decided to apply autoregressive residual into the zero-altered model.
However, I don't know…