Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
98 views

library(jagsUI); library(nimble) data_complete <- read.csv("wd.csv", colClasses = c("ch" = "character")) table_combo <- table(data_complete$mb, data_complete$fb) ...
Mandar Tijare's user avatar
1 vote
0 answers
38 views

I am new to JAGS and working on an assignment for a class. I have been trying to get my model to work for the past few hours and something just isn't clicking, and I hope someone here may be able to ...
Zoé Sandle's user avatar
0 votes
0 answers
53 views

Hi Bayesian modellers, I have this model written in JAGS and I would like to conduct a Posterior Predictive Check. model{ #loop observations for (i in 1:numObs){ choice[i]~dcat(theta[catid[i],...
stefano's user avatar
  • 425
0 votes
0 answers
67 views

Am familiar with model specification in this provided example with a Poisson distribution on N.lamb, N.ewe, and normal distribution on y.lamb, and y.ewe. I am interested in exploring this under a log-...
user11057680's user avatar
0 votes
1 answer
100 views

I am trying to model counts distribute across groups in JAGS, but I need to add a random effect for the presence of multiple counts from the same individual. The model is taken from here enter link ...
stefano's user avatar
  • 425
1 vote
2 answers
41 views

I have been learning JAGS through Marc Kery's "Introduction to WinBUGS for Ecologists". When adapting the WinBUGS code from here for the first ch 5 example, I have been getting the odd ...
CorinthianHelm's user avatar
1 vote
0 answers
17 views

I’m working with the following Pogit model: Y ~ Pois(lambdap) log(lambda) = alpa_0 + alpha_1x_1 + alpha_2x_2 logit(p) = gamma_0+gamma_1t_1 + gamma_2*t_2 I’m conducting a simulation study with two ...
GPan's user avatar
  • 11
0 votes
0 answers
29 views

I am attempting to create a daily nest survival probability that spans 4 years. The model in question is the null model fitting only the intercept. Model fitting in JAGs to estimate parameters using ...
EugeneRaymond's user avatar
1 vote
0 answers
45 views

I'm encountering an issue when trying to use the elements of the matrix D[i] inside a for loop in my JAGS model. The matrix D[i] is derived from a Wishart distribution, and when I try to use it within ...
user26829365's user avatar
0 votes
1 answer
224 views

I'm running a JAGS (JAGS 4.3.2) model in R using the rjags package (version 4.15), but I'm encountering an issue with the n.adapt parameter. Specifically, when I set n.adapt to any number like 1000, ...
polkas's user avatar
  • 4,214
0 votes
1 answer
57 views

I'm adapting some open source code to look at how environmental and organismal variables effect infection probability. I have been getting an error that states that there is a possible directed cycle ...
Katrina Keith's user avatar
0 votes
1 answer
158 views

I am trying to rerun the WinBugs code used in the paper 'A Bayesian Hierarchical Model for Risk Assessment of Methymercury'. I would like to be able to implement the same code but into JAGS (through ...
Valerie Esposito's user avatar
0 votes
1 answer
133 views

I am totally new in HMM and JAGS. My question is how can I get the hidden state sequence based on the trained model structure and parameters. Specifically, I have trained a hidden Markov model by ...
gtx's user avatar
  • 1
0 votes
1 answer
36 views

I'm writing a model to use with JAGS but the return is : " RUN TIME ERROR: Compilation error on line 12. Dimension mismatch taking subset of lambda" But I dont know what to do more (I ...
Lou dhollande's user avatar
0 votes
0 answers
54 views

I am currently trying to use JAGS to do Bayesian analysis on the LakeHuron dataset on R. I cant seem to understand why when I plot the traceplots my iterations start from 1000 and run to 2000 even ...
peely458's user avatar
1 vote
0 answers
107 views

I have binomial data that is split into several groups and data that corresponds to each data point, formatted like so: df <- data.frame(bin=c(1,1,1,1,1,0,0,0,0,0), group1 = c(1,1,0,0,0,0,0,0,0,0), ...
Jennifer Jones's user avatar
1 vote
1 answer
70 views

I am practicing Bayesian and trying to translate WINBUGS models into JAGS in R. I have looked the JAGS manual and still haven't been able to work out this one, which gives error - Possible directed ...
user avatar
0 votes
0 answers
37 views

I'm attempting to fit a Poisson GLMM in JAGS as per (AZuur, Hill & Reno 2013). I'm encountering the following error in R: Error in jags.model(model.file, data = data, inits = init.values, n.chains ...
asmart2's user avatar
0 votes
1 answer
457 views

I am using a GitHub Action in order to check an R package's functionality. In order to install a background dependeny (JAGS), I am using curl.exe: - name: Install jags (Windows) if: ...
Lukas D. Sauer's user avatar
2 votes
0 answers
55 views

I have a jags model in R: modelScript.name <- "rick.txt" jagsscript <- cat(" model { ###priors#### alpha.m ~ dunif(1,100); beta.m ~ dunif(0,1); #FlowEff ~ dnorm(0,3);...
vermicellion's user avatar
1 vote
1 answer
70 views

I am trying to display the results from a JAGS model in my Shiny app. The functions show a progress bar in the console when called. I would like to display a summary of the results only and not the ...
Natalie 's user avatar
1 vote
1 answer
173 views

I am working on a combined integrated model/population viability analysis in jags, and am trying to create a derived parameter to use in my population projections. In the current version of the model ...
Jenx3's user avatar
  • 11
0 votes
1 answer
127 views

I'm trying to create a multi-species N-mixture model to calculate the abundance of animals using data from three repeated surveys at four different site types (with only one site surveyed for each of ...
amphibiansrule's user avatar
0 votes
0 answers
84 views

I'm fairly new to using JAGS and I'm trying to get a growth curve model over time with two levels of variable (drug test group + sex). I'm running the following code but end up with : "Error in ...
Msilvestre's user avatar
0 votes
0 answers
342 views

I would like to create a plot like this, where y is the observed data and yrep is the predictions using rjags: I looked at the code from the example here: JAGS and R: Obtain posterior predictive ...
vermicellion's user avatar
0 votes
1 answer
134 views

I'm trying to implement a Bayesian model for football score prediction (English Premier League). I assume the number of scores follows the Poisson distribution with parameter lambda and this is the ...
Juan's user avatar
  • 25
2 votes
2 answers
2k views

I am using my school's server, so I don't have admin power to install it through sudo-apt like here. So, I create a virtual environment Renv and used conda to install it as conda install -c conda-...
Yulia Kentieva's user avatar
0 votes
1 answer
68 views

I am trying to code up a binomial Bayesian model and I get the following error: Error in checkForRemoteErrors(val) : 3 nodes produced errors; first error: RUNTIME ERROR: Compilation error on line 15. ...
hoganhaben's user avatar
0 votes
0 answers
58 views

I am new to using rJags. I have a jags model in R (version 4.3.0 (2023-04-21 ucrt)) using rjags (rjags_4-14). I am trying to add a random intercept of "creek" (Clean in the data below) to my ...
vermicellion's user avatar
0 votes
0 answers
27 views

I have a jags model in R (version 4.3.0 (2023-04-21 ucrt)) using rjags (rjags_4-14). The model runs without error for one dataset (named below: "works"). With a different dataset, which is ...
vermicellion's user avatar
1 vote
0 answers
94 views

I am trying to build a JAGS model that includes both cyclic smooths by week and covariate values that are estimated within the model. I can build a JAGS model that includes smooths using mgcv's jagam ...
lericci's user avatar
  • 11
0 votes
1 answer
54 views

I'm trying to estimate N from a binomial distribution as in https://stats.stackexchange.com/questions/113851/bayesian-estimation-of-n-of-a-binomial-distribution. I have 40 years of counts and an ...
Matt's user avatar
  • 153
0 votes
1 answer
816 views

I am trying to write a model using jags. The problem is that I am really new to jags language. I have a dataset that is basically a survey with 6 questions and one predictive variable. All are ...
TheKrab's user avatar
  • 21
1 vote
1 answer
442 views

I am running the code in this simple Rjags tutorial. Notice that the initial values of the parameters are specified by model.inits <- list(tau=1, beta0=1, beta1=0, beta2=0). I wanted to test that ...
bob's user avatar
  • 639
0 votes
1 answer
346 views

In a fixed power prior model, the model is set up as: Suppose that the event follows a Bernoulli distribution with probability p_i, what I want is to raise the Bernoulli likelihood to the power of w ...
Schnappiii's user avatar
1 vote
1 answer
290 views

I've built a linear regression model using rjags but I am getting a runtime error saying the index is out of range. I've looked for advice online but can't find anything that I understand or addresses ...
Louisa Wareing's user avatar
0 votes
1 answer
56 views

I am trying to calculate transition probabilities from different states in R/JAGS. But I am getting the following error- Error in jags.model(model.file, data = data, inits = init.values, n.chains = n....
Md. Zubab Ibne Moid's user avatar
0 votes
0 answers
47 views

Does the "jags" function of R2jags give estimated states output when estimating a state space model? Or is it to be derived manually using estimated mean/medians of parameter values.
Econcode97's user avatar
0 votes
1 answer
114 views

I am working with a matrix that is 35 rows and 16 columns. I am trying to run a Bayesian Multistate Model but something in my model code prevents it from working. When I run the code in R, I get the ...
Tyler's user avatar
  • 1
0 votes
0 answers
59 views

I'm trying to run a bird occupancy model using rjags and I'm getting an error saying: Error in node ytb[1,2,9,1:5,1] Node inconsistent with parents. The vector that the error references is a vector of ...
dankdweb's user avatar
0 votes
0 answers
256 views

I have created a model to investigate the effects of covariates on occupancy of different bird species at different points across different properties. However, when I try to run the model using rjags,...
dankdweb's user avatar
0 votes
2 answers
291 views

I am getting error. What does it mean by non-conforming parameters in Inprod() Error in jags.model(model.file, data = data, inits = init.values, n.chains = n.chains, : RUNTIME ERROR: Non-...
Md Arbaj Meman's user avatar
0 votes
1 answer
297 views

I'm trying to specify an occupancy model using rjags and I'm running into an error when it comes to running my model and the problem seems to be related to the specification my year effect which is ...
Harsh's user avatar
  • 11
1 vote
1 answer
804 views

I'm currently working on constructing a zero-inflated negative binomial model in JAGS to model yearly change in abundance using count data and am currently a bit lost on how best to specify the model. ...
Josh's user avatar
  • 69
0 votes
0 answers
237 views

I am creating a Bayesian linear regression model to predict points scored by players in a game using R and JAGS. I have 5 predictors, and the basic linear regression model is of the form: points = ...
JimJam's user avatar
  • 1
0 votes
1 answer
454 views

I am using R2jags to estimate latent factor using both binary and continuous variables. I was wondering wether jags command from R2jags can handle both binary and continuous variables at the same time....
Sarah's user avatar
  • 15
1 vote
1 answer
249 views

I searched about the JAGS's manual and one post (here in 2012) about the ordinary differential equation (ode). I was thinking JAGS can because it's similar to WinBUGS (which does it through WBdiff ...
T X's user avatar
  • 613
0 votes
1 answer
290 views

I'm running the following code to attempt Bayesian modelling using rjags but coming up with the syntax error below. Error in jags.model(file = "RhoModeldef.txt", data = ModelData, inits = ...
Dexoryte's user avatar
0 votes
1 answer
53 views

I am working with a dataframe with 234 rows of 4 variables: Fish Age, Mercury Concentration (Hg), Distance from Mouth, and Site #. I am trying to run a multi linear regression to see how Age and ...
Tyler's user avatar
  • 1
2 votes
0 answers
902 views

I am trying to run a logistic regression model in JAGS, with a binomial response (rather than Bernoulli process) and wish to model month as a categorical variable. I can easily model month as a ...
Mark's user avatar
  • 47

1
2 3 4 5
10