Fix bug in detection of all-missing data entries
Update parsing of R dump data.
Node::initialize defunct.
Catch non-integer initial values before they cause trouble in glm::LGMix.
Allow jags to read dumped R output with compact reverse integer sequences.
Thanks for the fix! That is very bizarre! The problem has been happening on the last few datasets I've worked with, but I have data where I don't see the problem. Very mysterious, but your solution was a great motivation to switch to rjags, which I also got to work thanks to your advice.
It appears that JAGS is not reading in the data correctly from the file post_params.R. By switching on some diagnostic messages, I can see what JAGS does when it reads in the data: Reading data file post_params.R Reading AGE.p[500] Reading ECW.p[2000] Reading GDF15_LnLn.p[2000] Reading LA_ratio_Ln.p[1000] Reading LYMPabs.p[500] Reading SIRI.p[500] Reading D2TM.p[2000] Reading HLD.p[2000] Reading HTM.p[2000] Reading CVD.p[3000] Reading prec.AGE.p[500] Reading prec.ECW.p[500] Reading prec.GDF15_LnLn.p[500]...
This looks like a bug in the R2jags package. Here are the equivalent steps using rjags. > m <- jags.model("model.bug", data=d, n.chain=3) Compiling model graph Resolving undeclared variables Allocating nodes Graph information: Fully observed stochastic nodes: 72 Unobserved stochastic nodes: 11 Total graph size: 454 Initializing model |++++++++++++++++++++++++++++++++++++++++++++++++++| 100% > update(m, 1000) |**************************************************| 100% > s <- jags.samples(m, variable.names=c("b",...
I have the same confusion. Did you resolve your problem?
It seems no matter what model I'm trying to build I get the following error on the last line: model <- jags.model(textConnection(AllLines), data = list(), n.chains = num_cores) Compiling model graph Resolving undeclared variables Allocating nodes Deleting model Error in jags.model(textConnection(AllLines), data = list(), n.chains = num_cores) : RUNTIME ERROR: Compilation error on line 143. Unknown variable CVD.p Either supply values for this variable with the data or define it on the left hand side...
Invalid shape in LGMix::updateShape
I have discovered through an independent bug report that this error is caused by using non-integer values as initial values for a node with a Poisson distribution, which is then used as an outcome variable in a Poisson GLM. I have added additional checks to ensure that the user gets an informative message when initializing discrete-valued variables with non-integer values. Closing this now.
Hi, I need some help calculating the 90th percentile of a 3D vector within a JAGS model. This needs to be done to integrate 2 models, so that the output of the first model is used as a predictor in the second model. I am providing an example below of how could it be done using the mean, but I am interested in calculating the 90th percetile across one of the vector's dimension instead. Has anyone run into a similar situation before or know how to do this? I have been searching through the manual,...
Hi everyone, First off thank you to Martyn for the rjags package and for creating this forum. I have the following code library(rjags) customer_level_data <- read.table("Data1.txt", header=TRUE) visit_level_data <- read.table("Data2.txt", header=TRUE) R <- diag(c(0.1,0.1,0.1,0.1,0.1)) jags_data <- list(I=nrow(customer_level_data), NoVisits=customer_level_data$NoVisits.., Start=customer_level_data$Start.., HDay=visit_level_data$HDay.., MKT=visit_level_data$MKT.., LMKT=visit_level_data$LMKT.., IntTimeBeforeMKT=visit_level_data$IntTimeBeforeMKT..,...
Here is the bugscode
Hi everyone, First off thank you to Martyn for the rjags package and for creating this forum. I have the following code library(rjags) customer_level_data <- read.table("Data1.txt", header=TRUE) visit_level_data <- read.table("Data2.txt", header=TRUE) R <- diag(c(0.1,0.1,0.1,0.1,0.1)) jags_data <- list(I=nrow(customer_level_data), NoVisits=customer_level_data$NoVisits.., Start=customer_level_data$Start.., HDay=visit_level_data$HDay.., MKT=visit_level_data$MKT.., LMKT=visit_level_data$LMKT.., IntTimeBeforeMKT=visit_level_data$IntTimeBeforeMKT..,...
Hi Martyn, Sorry to the long delays in reply, the holidays came around, fell a little sick and forgot about this. Just wanted to say thanks for the prompt reply, it was helpful. I had a quick look into that a while ago. Happy belated new year! Larry
I am trying to fit a BUGS model in rjags. However I get the following warning and error message: Error in model$jags <- rjags::jags.model(path$bugs, data, inits, n.chains = chains, : cannot add bindings to a locked environment I am trying to understand what may be causing the error. Full output Compiling model graph Resolving undeclared variables Allocating nodes Graph information: Observed stochastic nodes: 10898 Unobserved stochastic nodes: 1953 Total graph size: 34848 Initializing model Warning...
Yes, the dinterval distribution is flexible enough to include these different constraints. For example, if you have a 2-dimensional multivariate normal that is unobserved: Z[1:2] ~ dmnorm(mu[1:2], Tau[1:2,1:2]) and both mu and Tau are fixed quantities. Then you can censor Z[1] as positive and Z[2] as negative with: ~~~ for (i in 1:2) { S[i] ~ dinterval(Z[i], 0) } ~~~ where S is supplied as data: ~~~ S <- c(1, 0) ~~~ You will also need to supply starting values for Z such that Z[1] starts with a positive...
Two question regarding this solution. 1) Would this work if I want to encode the information that every element of the array is negative? 2) Would this work if I want to encode the information that some elements of the array are positive and some are negative?
Dear Jags community & Martyn, Thanks for previous help and thanks again in advance for any additional help you can provide here. I am encountering a new error in relation to this model. It turns out that because the likelihood is Bernoulli, the previous attempt at calculating the Bayesian p-value was incorrect. I have tried to implement a new method for that calcuation ad have run into a new error: RUNTIME ERROR: Compilation error on line 44. Possible directed cycle involving y.hat.dev like 44 is...
Dear Jags community & Martyn, Thanks for previous help and thanks again in advance for any additional help you can provide here. I am encountering a new error in relation to this model. It turns out that because the likelihood is Bernoulli, the previous attempt at calculating the Bayesian p-value was incorrect. I have tried to implement a new method for that calcuation ad have run into a new error: RUNTIME ERROR: Compilation error on line 44. Possible directed cycle involving y.hat.dev like 44 is...
This turned out to be a memory issue. The workers were running out of momory. The 'negative vector' error seems to be a generic R error when computations reach memory limits. https://stackoverflow.com/questions/77641108/jags-error-negative-length-vectors-are-not-allowed
@mdenwood Thanks so much for the blog - I missed it. My model code is generated by wrapper functions automatically, and indeed there are a lot of deterministic relations. However, I stick to the order as described in the post, though perhaps with some exceptions (but I think it is rare). Perhaps this is easier to reproduce: devtools::install_github("zhenkewu/baker") example(baker::nplcm) If you run this code under 4.3.2 vs 4.2.0, the speed difference is noticeable. I agree I was vague - sorry about...
@mdenwood Thanks so much for the blog - I missed it. My model code is generated by wrapper functions automatically, and indeed there are a lot of deterministic relations. However, I stick to the order as described in the post, though perhaps with some exceptions (but I think it is rare). Perhaps this is easier to reproduce: devtools::install_github("zhenkewu/baker") example(baker::nplcm) If you run this code under 4.3.2 vs 4.2.0, the speed difference is noticeable. I agree I was vague - sorry about...
Sorry I thought you were talking about 4.3.1 vs 4.3.2. There were much bigger changes between 4.2.x and 4.3.x. Among these, I did accidentally introduce some memory management issues which would affect models with a large number of mixture nodes, i.e. nodes defined by a random subset of a node array such as Y[i] in the code snippet below. Y[i] ~ X[Z[i]] Z[i] ~ dcat(p[]) I have addressed these issues in the development version.
Indeed, that was the case. Thanks for your keen eye, Martyn. Take care & happy holidays here is a complete solution to the issue for reference: ###### ---------------------------- ###### ## Posterior predictive simulations --- Bayesian p.vals ## predicted y-hat values y.pred[s,j,t] ~ dbern(phi[s,j,t]) bp.data[s,j,t] = ifelse(y.pred[s,j,t] < y[s,j,t], 1, 0) ## if y is less than y.pred return 1, else zero ###### ---------------------------- ###### } # end j loop ## Bayesian p.val matrix by species...
A small change in compilation speed between JAGS 4.2.0 and 4.3.2 could be expected due to the changes to the way in which JAGS reads the model definition, as described at https://martynplummer.wordpress.com/2016/09/14/you-can-always-make-it-faster/#more-822 However, you say "much faster", which implies a more dramatic difference. Can you provide a minimal reproducible example of a model that compiles much more quickly using JAGS 4.2.0 (preferably also including details of the timings under both versions,...
Thank you for the prompt response!
Thank you for the prompt response!
I can confirm it is much much faster using JAGS 4.2.0 than JAGS 4.3.2, regardless of whether it is an Intel chip Apple macbook pro, or a M1 Chip macbook pro. So I feel this has something to do with the newer version of 4.3.2.
I did release a Windows binary for JAGS 4.3.2 but did not test it properly and it turned out to be buggy so I withdrew it. Since JAGS 4.3.1 has exactly the same features as JAGS 4.3.2 I never rolled up another one. The only reason I released JAGS 4.3.2 was that some platforms had started to use a compiler that defaults to the C++17 standard. Such compilers issued warnings about a few lines of archaic code that are fixed in JAGS 4.3.2 but that is literally the only difference.
Your loop over t starts at 2. So you have not defined bp.data[1,s,j] for any s, j. You probably want to take the mean of bp.data[2:Nmeas, , ].
Dear JAGS community, Thanks in advance or your time. I am running the following survival model, and I keep running into a pesky error when trying to calculate the mean of an array for a Bayesian P value calculation. I get the following error: RUNTIME ERROR: Compilation error on line 37. Cannot evaluate subset expression for p.val Line 37 is: p.val <- mean(bp.data[,,]) How can I take the mean of an array in JAGS? Here is the model specification: cat(" model { #### Likelihood # 3-D for (t in 2:Nmeas)...
Dear JAGS community, Thanks in advance or your time. I am running the following survival model, and I keep running into a pesky error when trying to calculate the mean of an array for a Bayesian P value calculation. I get the following error: RUNTIME ERROR: Compilation error on line 37. Cannot evaluate subset expression for p.val Here is the model specification: cat(" model { #### Likelihood # 3-D for (t in 2:Nmeas) { # loop over re-measurement intervals ## starting @ 2 for (s in 1:Nsp) { # loop...
Thanks Martyn. Will look into cut - I was aware of this issue, thanks for your rigor in retiring it. On the I(), I have changed to T() which works great. I hope to have some follow up on the compiling speed issue - so will have my collaborators test as well. It was surprising to me.
At https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Windows/, I only see 4.3.0 and 4.3.1, but not 4.3.2. I am using R 4.3.2, and based on the instruction, I should install JAGS 4.3.2. Where can I find it? Thanks.
Hi Martyn, thanks so much for taking the time to reply! I almost posted an update yesterday as I'd managed (with help) to identify those two errors you pointed out. For the variance, I did as you suggested and calculated it outside of the model and then included it with the other data. As far as the Dem.prec parameter, I ended up finding some different code examples from the same author and it seems like there was a typo in the original code I was going off of. The new line was: Dem.prec[t,i] <-...
Thank you for the feedback 1) The cut function does not work correctly as I pointed out in my 2015 paper in STCO: https://link.springer.com/article/10.1007/s11222-014-9503-z 2) This is a misunderstanding of the error message. The "I()" construct is allowed in JAGS for compatibility with BUGS, but only if the parameters of the model are fixed, e.g. y ~ dnorm(mu, tau) I(0, ) is only allowed if both mu and tau are fixed. If they are not fixed then you need to decide if you want truncation y ~ dnorm(mu,...
Thanks for the reprex. There are a couple of problems here. Firslty there is no var function in JAGS for calculating the variance. svar[i] <- var(y[,i]) # Not sure if this is correct notation; svar[i] is the variance of y[,i] There is an SD function for calculating the standad deviation. In this case, since y is observed, we can calculate the variance in R and add it to the data. Second problem is that you have a directed cycle in the model with y[t,i] and Dem.prec[t,i] defined in terms of each other:...
Hi Larry, If you have a copy of the JAGS source code then you can find the code for conjugate samplers in src/modules/bugs/samplers. All the files starting with "Conjugate" contain the code for conjugate samplers. The ShiftedCount and ShiftedMultinomial methods also count as conjugate samplers. If you look in the file ConjugateFactory.cc you can get an idea of how it works. The factory object traverses the graph looking for nodes that are not yet associated with a sampler. If it recognizes a distribution...
Residuals can be tricky things to define, even for frequentists. I've just finished teaching a module on GLMs where there are at least 4 competing definitions of residuals. For a normal model with constant variance, however, there is an unambiguous definition. It is the difference between the observed value and its expectation at the maximum likelihood estimate of the parameters. You could define residuals for your data by rewriting your model as: lRR[i] ~ dnorm(mu[i], pow(sigmaObs, -2)) mu[i] <-...
Hi Martyn, My name is Larry and I am a PhD student in biostatistics at the University of Toronto. By day, I run simulations for my PhD projects and, by night, I am a PyMC developer; I recently gained more and more interest in RJags since it seems to somehow work better for longitudinal data modelling. Does RJags use conjugacy when performing posterior sampling? I tried digging a bit in the source code, but I was unable to find an answer to my question. If RJags exploits conjugacy, can you pinpoint...
Hi Martyn, My name is Larry and I am a PhD student in biostatistics at the University of Toronto. By day, I run simulations for my PhD projects and, by night, I am a PyMC developer; I recently gained more and more interest in RJags since it seems to somehow work better for longitudinal data modelling. Does RJags use conjugacy when performing posterior sampling? I tried digging a bit in the source code, but I was unable to find an answer to my question. If RJags exploits conjugacy, can you pinpoint...
crossposted: https://stackoverflow.com/questions/77685833/define-residuals-in-hierarchical-jags-model-r
I am new to JAGS. I would like to define residuals in my model to monitor, but I am unsure how to do so on a hierarchical model. I am doing this in R using rjags. My model is below. Thanks! modelScript.name <- "rick.txt" jagsscript <- cat(" model { alpha.m ~ dunif(1,100); beta.m ~ dunif(0,1); #FlowEff ~ dnorm(0,3); s.a.sd ~ dunif(0,3); s.b.sd ~ dunif(0,3); sigmaObs ~ dunif(0,2); for(i in 1:Ndata){ lRR[i] ~ dnorm(log(pRR[i]) - (pow(sigmaObs,2)/2),pow(sigmaObs,-2)); pRR[i] <- alpha[i] * SS[i] * exp(-1*beta[i]*SS[i]);...
I am new to JAGS. I would like to define residuals in my model to monitor, but I am unsure how to do so on a hierarchical model. My model is below. Thanks! modelScript.name <- "rick.txt" jagsscript <- cat(" model { alpha.m ~ dunif(1,100); beta.m ~ dunif(0,1); #FlowEff ~ dnorm(0,3); s.a.sd ~ dunif(0,3); s.b.sd ~ dunif(0,3); sigmaObs ~ dunif(0,2); for(i in 1:Ndata){ lRR[i] ~ dnorm(log(pRR[i]) - (pow(sigmaObs,2)/2),pow(sigmaObs,-2)); pRR[i] <- alpha[i] * SS[i] * exp(-1*beta[i]*SS[i]); lalpha[i] <- log(alpha.m)...
I have been using JAGS for quite some time. This is used in baker package: https://github.com/zhenkewu/baker However, some recent errors in the CRAN checks led me to notice some changes, I hope to confirm or to bring to your attention: 1) cut function is not available 2) I(a,b) does not work if a is like 0.000001, and b is like 0.999999 - the error messages shows these are not fixed quantities - but clearly they are. 3) If the matrix in the jagsdata.txt has dimension specfication such as. "dim=7:6",...
I have been using JAGS for quite some time. This is used in baker package: https://github.com/zhenkewu/baker However, some recent errors in the CRAN checks led me to notice some changes, I hope to confirm or to bring to your attention: 1) cut function is not available 2) I(a,b) does not work if a is like 0.000001, and b is like 0.999999 - the error messages shows these are not fixed quantities - but clearly they are. 3) If the matrix in the jagsdata.txt has dimension specfication such as. "dim=7:6",...
I was using rjags and R2jags - so it could also be some changes to these packages.
I have been using JAGS for quite some time. This is used in baker package: https://github.com/zhenkewu/baker However, some recent errors in the CRAN checks led me to notice some changes, I hope to confirm or to bring to your attention: 1) cut function is not available 2) I(a,b) does not work if a is like 0.000001, and b is like 0.999999 - the error messages shows these are not fixed quantities - but clearly they are. 3) If the matrix in the jagsdata.txt has dimension specfication such as. "dim=7:6",...
Hi all, I'm a PhD student in quantitative ecology and I've been trying to troubleshoot some code for a while now with no success. I am trying to adapt the model created by Mutshinda et al in their 2019 paper (DOI: 10.1556/168.2019.20.3.4). The original code is in BUGS but I'm trying to convert it to JAGS as I am more familiar working with packages that use JAGS. I've put together a reprex using simulated data. I suspect I may have something mispecified in the "Dynamical Model" portion of the script...
Dear JAGS community, I am experiencing an error when trying to run a Bayesian model. I am pretty sure that the issue is not related to model specification or the data, as I have had some success runnning the model previously on a local R session. I run into the error when I set the model to run a cluster (the USDA Ceres cluster). Error in FUN(X[[i]], ...) : negative length vectors are not allowed or if running in parallel Error in checkForRemoteErrors(val) : 3 nodes produced errors; first error:...
Hi there. did you find a solution to this issue? I am experiencing a similar issue. Thanks,
We had to install the library jags, to be back to install the packages R2jags.
We had to install the library jags, to be back to install the packages R2jags.
Installing rjags on R Studio Server.
Fix CRAN warnings from calls to error()
Update Makevars.ucrt for JAGS 5.0.0
Branch merge
Fixed definition mismatch for quietMessages
Hi, I need to install rjags on R studio Server which is installed on Linux. Then my costumers are using a Windows 11 to work with R Studio with a browser. I get this error when trying to install rjags on the linux server : installing source package ‘rjags’ ... ** package ‘rjags’ correctement décompressé et sommes MD5 vérifiées ** using staged installation checking for pkg-config... /usr/bin/pkg-config configure: WARNING: pkg-config file for jags 4 unavailable configure: WARNING: Consider adding the...
There is limited capability to model derived quantities as outcomes in JAGS. We can handle sums of random variables, but not ratios. A model in the BUGS language should describe a plausible mechanism for generating the data and be functionally capable of generating new observations. If you try to model the ratio of two variables, e.g. X[i]/Y[i] ~ dbeta(alpha[i], beta[i]) then the model cannot generate new values for X[i] and Y[i] because you have not properly specified their joint distribution. If...
How many parameters are you trying to monitor at once? It is possible that you are simply running out of memory. If you do want to monitor a large number of parameters then there are more compact monitors available than the default trace monitors. To access these use the jags.samples() function instead of coda.samples(). For example if you just want the mean of beta then you can do jags.samples(model, n.iter=1000, type="mean", variable.names="beta")
Can you please elaborate on how you came up with this solution? I have a similar issue and I'm having trouble determining how to implement this without a proper grasp on the theory. How did you determine the correction for mu? I can see that you didn't just rearrange the equation, but I can't quite grasp what you did and whether it's specific to the lognormal distribution. Why did you switch your indexing to k? Are you only making this correction for the partially observed values of events? Are the...
Yes, we have JAGS installed on our (red hat enterprise) cluster, and I know of several others that have also done this, so it is very possible. Although obviously it depends on which precise distribution (and version) of Linux you are using (there are dozens, each of which would need a different binary) - so we would need further details to help. But in any case, linux software is usually managed via the package management environment for the relevant distribution (yum, apt-get and friends), so I...
Dear JAGS community, Has anyone successfully installed JAGS on a cluster? I think the install will need the Linux binary, but that seems to be missing from the following link: https://mcmc-jags.sourceforge.io/ which states: "Binaries for Linux are distributed separately. There are packages for various RPM-based Linux distributions (RHEL 5, 6, 7; OpenSuSE 13.1, 13.2, TumbleWeed; CentOS 5, 6, 7; Fedora 20) (Thanks to Lars Vilhuber)" but the link is no longer working. Can somebody please point me to...
Dear JAGS community, Has anyone sucessfully installed JAGS on a cluster? I think the install will need the Linux binary, but that seems to be missing from the following link: https://mcmc-jags.sourceforge.io/ which states: "Binaries for Linux are distributed separately. There are packages for various RPM-based Linux distributions (RHEL 5, 6, 7; OpenSuSE 13.1, 13.2, TumbleWeed; CentOS 5, 6, 7; Fedora 20) (Thanks to Lars Vilhuber)" but the link is no longer working. Can somebody please point me to...
Hi all, I have a recurrent problem. When I try to run many (eg 50k ) iterations with coda.samples, R crashes with a "fatal error" message. I can successfully sample from the same model with fewer iterations (eg 1000). Is there some known issue (e.g., memory related) that might explain this? Program versions: JAGS 4.31 and rjags_4-14 Same behavior with R 4.31 and 4.2.2 I apologize in advance if I have omitted anything crucial. Novice JAGS user, and first time poster. Thank you /Björn
Allow the reordering of mcmc object matrices to be in a user specified order
Support nimble syntax for truncation
Thanks, this is great news! The ^ vs. * example looks surprising to me, but luckily doesn't seem to matter for our use case.
Thanks Kirill. This is a brilliant suggestion that I have now implemented. The pipe syntax really ties together the two ways to write a truncated distribution. The reason that the pipe operator has such high precedence is that it was originally a user-defined operator, which has higher precedence than just about all other infix operators, mainly due to its long-standing use for matrix multiplication. When Luke created the native R pipe he kept the same precedence, as the behaviour of the magrittr...
Add test for truncation using pipe syntax.
Allow truncation using pipe syntax. Thanks to Kirill Müller for the suggestion.
Updating parser for more flexible truncation syntax, plus some cleaning up.
Hello all, 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 jags.model("GCM.txt", data = jagsData, n.chains = chains, n.adapt = adaptation, : Error in node betas[1,1:4] Invalid parent values" when creating the jags model object. **# Creating a matrix with only weights: # We `unlist' all N rows of selected columns from the data set, # then transform these...
Fixes for Fedora 39
Hi Martyn, thanks for your response and for finishing my rough patch. I was surprised to see that |> binds stronger than ~ in R: lobstr::ast(x ~ a |> b()) #> █─`~` #> ├─x #> └─█─b #> └─a If we allow var ~ dxxx(...) |> T(lower, upper) and similar, the benefit will be that R's parser will convert this to var ~ T(dxxx(...), lower, upper) . This means that NIMBLE will be able to support this syntax out of the box, without having to change at all, and JAGS could get a fully compatible syntax that is idiomatic...
Hi David, yes the z matrix is given as data from the known.state function given in Kery and Schaub. So in other words, this would mean that a value in the z-matrix is NA allowing for estimation, but the CH matrix (observed survival) is not NA, so it can't overwrite an observed node?
Hi Matt, Trying to get rjags installed on a MacBook Pro with an M2 chip but the installer failed. Used this link: https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/ In the final step of the install, the one listed as "Summary", I get: "The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance." Have you seen this one before? Let me know Thanks Bruce
Hi Matt, Trying to get rjags installed on a MacBook Pro with an M2 chip but the installer failed. Used this link: https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/ In the final step of the install, the one listed as "Summary", I get: "The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance." Have you seen this one before? Let me know Thanks Bruce
Hi Matt, Trying to get rjags installed on a MacBook Pro with an M2 chip but the installer failed. Used this link: https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/ In the final step of the install, the one listed as "Summary", I get: "The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance." Have you seen this one before? Let me know Thanks Bruce
Hi Matt, Trying to get rjags installed on a MacBook Pro with an M2 chip but the installer failed. Used this link: https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/ In the final step of the install, the one listed as "Summary", I get: "The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance." Have you seen this one before? Let me know Thanks Bruce
Hi Matt, Trying to get rjags installed on a MacBook Pro with an M2 chip but the installer failed. Used this link: https://sourceforge.net/projects/mcmc-jags/files/JAGS/4.x/Mac%20OS%20X/ In the final step of the install, the one listed as "Summary", I get: "The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance." Have you seen this one before? Let me know Thanks Bruce
Hi Martyn, That's great the patch was useful. This discussion can be closed (I'm currently not sure how) Thanks Joe
Thanks Kiril. This is very useful. I have applied your patch and updated the reference manual. I also added some examples of NIMBLE-style truncation syntax to the classic BUGS examples to ensure that this works. The BUGS syntax for censoring is a real pain, not just because it doesn't parse in R, but also because it is very difficult for JAGS to parse. I had to write special rules in the scanner to make it work. I've been thinking about the need for a more general syntax for distributional modifiers...
Allow NIMBLE-style syntax for trunctation
Updating R check to include tests for NIMBLE-style truncation syntax
Renaming files in vol2/eyes for greater consistency
Adding tests for NIMBLE-style truncation syntax
Hey Luke, I just happen to be bouncing around and saw this. I didn't comb through your code carefully, but this error can arise when you try to set an initial value for a node when that node is being passed to jags as data. Is z already defined as data?
Hi Martyn, Kirill Mueller has created a ticket to edit the JAGS parser to handle nimble syntax for truncation. https://sourceforge.net/p/mcmc-jags/patches/8/ Is this something you are interested in? Thanks Joe
Support nimble syntax for truncation
UPDATE: The R2jags::jags (v 0.7-1) object alphabetically sorts the parameters by uppercase first, e.g., B, C, a, b, c. And, bridgesampling::bridgesampler (v 1.1-2) somehow ignores all the parameters before "deviance". See https://rpubs.com/sherloconan/1015445
Dear Dr. Plummer, Can you please provide the instructions on how to download the development version of JAGS, so I have access to these more detailed error messages? Thank you, Aaron
Hi JAGS community. I am getting another error when I try to run the following model. The error is: Error in checkForRemoteErrors(val) : 3 nodes produced errors; first error: Error in node m[1,1,2] Invalid parent values I am guessing this error has to do with m somehow taking a negative value, but do not know how to interpret or fix this error. The model is a Bernoulli- Beta Logit regression survival model, which predicts tree survival as a a function of several size- based predictors. model { ####...
Thank you Dr. Plummer, that answers the question and clarifies the error. That Nind index needs to be a matrix, actually (or Nindividuals per species (rows) vs. the censuses (columns)). I am continuing to develop this model. I may post again in the future if need be. Thank you very much for your time and prompt reply.
Hi JAGS community, I am getting an error when I try to run the following model. Here is the model -- it is a Bernoulli- Beta Logit regression survival model, which predicts tree survival as a a function of several size- based predictors: model { #### Likelihood # 3-D for (s in 1:Nsp) { # loop over species for (j in 1:Nind[s]) { # loop over individuals per species for(t in 1:Nmeas) { # loop over re-measurement intervals ## species-level process model logit(mu[s,j,t]) <- b0[s,t] + b1[s,t] * (log(CROWN_LENGTH[s,j,t])...