Questions tagged [rjags]
149 questions
1
vote
1 answer
Attempt to redefine node p[1,1] When adding covariates to beta-binomial mixture model
I keep getting the above error when I try adding detection covariates on a beta-binomial N-mixture model in rags. According to Royle(2004). A binomial N mixture model can be used to model abundance data arising from repeat count surveys. The number…

mutinda festus
- 59
- 5
1
vote
0 answers
Fitting a NLME model in jags
Generate some data
##### Load packages
library(nlme); library(lme4)
library(dclone)
### GENERATE SOME DATA
## Example data with a weibull curve
k <- 120;
nindivs <- 30;
pwr <- 0.2
a <- 500
set.seed(123)
sim.data <-…

Constantin
- 132
- 9
1
vote
1 answer
Unable to load rjags on windows 10
I'm having trouble loading rjags. Operating system is Windows 10. R version is 4.1.1, and JAGS is 4.3.0. And rjags is installed through install.packages("rjags") Below is what happened when I tried to load rjags.
require(rjags)
Loading required…

EricAtani
- 55
- 7
1
vote
0 answers
Number of stochastic nodes and identifiability in JAGS
How does JAGS count the number of stochastic nodes? I assume that the number of "observed stochastic nodes" are the data points and the "unobserved stochastic nodes" are the parameters, right? Does that mean, that, when the number of unobserved…

Phd Student
- 81
- 4
1
vote
1 answer
Multivariate Bayesian Modelling using Jags -Rjags
The error obtained is shown here in this image and as well written below
i.e.,
> model<-jags.model(file=textConnection(model1), data=df,inits =inits)
Compiling model graph
Resolving undeclared variables
Deleting model
Error in jags.model(file =…

Him
- 11
- 3
1
vote
2 answers
Installing rjags on Fedora 33
I'm trying to install rjags on a Fedora 33 system running R 4.0.3. I've installed JAGS 4.3.0 from source and can run the software from the command line, but when I try to install the package in R, I get this error:
checking version of JAGS…

KirkD-CO
- 1,603
- 1
- 22
- 35
1
vote
0 answers
what is the reason to draw the scatterplot matrix for the mcmc sample?
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

hard worker
- 181
- 8
1
vote
1 answer
mtc.network error "Error in `levels<-`(`*tmp*`, value = as.character(levels)) : factor level [5] is duplicated"
I have seen some similar problems to my query here but those solutions have not worked for me. I am trying to build a network meta-analysis and am encountering the following error after calling the mtc.network command:
Error in `levels<-`(`*tmp*`,…

Sandro
- 101
- 7
1
vote
0 answers
why my trace plot looks like this for some parameters in Jags?
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…

hard worker
- 181
- 8
1
vote
1 answer
rjags ANOVA with separate variances for each group
I am trying to use rjags to conduct an ANOVA wih separate variances for each of the three groups. I am using the "PlantGrowth" data built into R.
Here is the model:
mod_string = " model {
for (i in 1:length(y)) {
y[i] ~ dnorm(mu[grp[i]],…

Jennifer B.
- 163
- 1
- 4
- 10
1
vote
0 answers
JAGS model sometimes gives "Slicer stuck at value with infinite density error"
I have the following model in JAGS but sometimes it does not run, here is the code:
library(rjags)
model1 <- "model {
for (j in 1:nobs){
y[j] ~ dbeta(lambda[j] + 10^(-323), 1-lambda[j] - 10^(-323))
logit(lambda[j]) <- inprod(X[j, ], beta)…

ie86
- 157
- 5
1
vote
1 answer
Regarding a warning message in JAGS for R
I am experimenting with rjags r package while learning Bayesian. I fitted following multivariate model using tobacco data set in rrr package.
where \gamma is a random intercept which measures the correlation between the outcomes. Also I…

student_R123
- 962
- 11
- 30
1
vote
0 answers
Time-varying covariates in Weibull AFT Bayesian Survival model in R using rjags package
It has been a while that I am trying to find a way in rjags to write a code for a Bayesian Weibull AFT Survival Analysis model with time-varying (time-dependent) covariates.
The data I am working on is about the duration from buying to disposal.…

Mary B
- 13
- 3
1
vote
1 answer
RJAGS compilation with categorical variable throws index out of range error
Background
Trying to model volume of bikers in a rail trail which is less for a weekday as compared to a weekend. RailTrail from mosaicData contains data collected by the Pioneer Valley Planning Commission on the usage of a local rail-trail. For…

hnovice
- 43
- 5
1
vote
0 answers
rjags: error in node x, node inconsistent with parents - Logistic regression 'Liszt-package' in R 4.0.0
I am trying to perform a listlength-analysis (basically a multiple logistic regression) in a Bayesian framework using the 'Liszt' package. This is a beta package that can only be installed from here:…

Stevestingray
- 399
- 2
- 12