User Activity

  • Posted a comment on discussion Open Discussion on JAGS: Just Another Gibbs Sampler

    Hi all, Cant seem to figure this one out. Usually when I see this error it means I missed a bracket or parenthesis, but I've been staring at it for hours and can't find the issue. Am I blind? Anyone see anything? model{ for (i in 1:nind){ #i for (t in f[i]:(l[i]-1)){ #t for(s in 1:2){ logit(psi[s,i,t]) <- mu[s] + epsilon[t] + alpha[i] + beta[i]*pp[t] } } } ## Priors mu.orig[1] ~ dbeta(1,1) mu.orig[2] ~ dbeta(1,1) mu[1]<-log(mu.orig[1] / (1-mu.orig[1])) mu[2]<-log(mu.orig[2] / (1-mu.orig[2])) for...

  • Posted a comment on discussion Help on JAGS: Just Another Gibbs Sampler

    Hi all, Running a finite mixture model to look at individual heterogeneity in survival. This model works on simulated data, but not on real data, and I cant tell why. I get the error message: Error in update.jags(object, n.iter, ...) : Error in node z[269,1] Cannot normalize density Here is the code for the SIMULATION: rm(list=ls()) setwd("~/Desktop/mix mod") library(rjags) rm(list=ls()) r = set.seed(3) # for reproducibility p = 0.5 # detection prop_class1 = 0.3 # pi phi_class1 = 0.85 # survival...

  • Posted a comment on discussion Help on JAGS: Just Another Gibbs Sampler

    Hi all, Wondering if any of you know why JAGS would tell me there was a dimension mismatch with my initial values, other than the initial values for an object having a different dimensions from that object. I am attempting to fit a spatially explicit capture-recapture model in which I estimate a fish location (x,y) at each time step. There are M=64 individuals for T=21 time steps. This is estimated in array s, that loops over the 64 individuals from their first detection to their last detection (dimensions...

  • Posted a comment on discussion Help on JAGS: Just Another Gibbs Sampler

    I have never seen this error message before when running a JAGS model, and extensive Googling has done nothing to help. I am hoping for some direction on where to start searching for a problem. Thanks!

  • Modified a comment on discussion Open Discussion on JAGS: Just Another Gibbs Sampler

    Hi all, Code below runs just fine using JAGS, but when using jags.parallel in R2jags, I get an error code that: Error in checkForRemoteErrors(lapply(cl, recvResult)) : 3 nodes produced errors; first error: object 'z' not found But z is a matrix object in my enviornment that I have already created. z is the only matrix in my inits function, so I am assuming it is having a hard time with that? z.init<-function(ch,f){ for( i in 1:dim(ch)[1]){ch[i,1:f[i]]<-NA} return(ch) } z<-z.init(s,f) inits <- function(){...

  • Posted a comment on discussion Open Discussion on JAGS: Just Another Gibbs Sampler

    Hi all, Code below runs just fine using JAGS, but when using jags.parallel in R2jags, I get an error code that: Error in checkForRemoteErrors(lapply(cl, recvResult)) : 3 nodes produced errors; first error: object 'z' not found But z is a matrix object in my enviornment that I have already created. z is the only matrix in my inits function, so I am assuming it is having a hard time with that? z.init<-function(ch,f){ for( i in 1:dim(ch)[1]){ch[i,1:f[i]]<-NA} return(ch) } z<-z.init(s,f) inits <- function(){...

  • Posted a comment on discussion Help on JAGS: Just Another Gibbs Sampler

    Hi, Part of my model runs logistic regressions with some predictors. This model ran fine until I made one of my predictors (P) into a categorical variable rather than continuous, for ecological reasons. Previously, I had: kappa.suc*P[i,t] And I changed it to kappa.suc[P[i,t]] To have three different kappa.suc parameters, one for each level of P. P is provided to JAGS as data. Previously P was an integer matrix, with values ranging 1:35, and I coded those P values into three levels, 1:3. Anyone see...

  • Posted a comment on discussion Help on JAGS: Just Another Gibbs Sampler

    Thanks, Martyn!!

View All

Personal Data

Username:
jjbadger
Joined:
2018-05-29 23:16:56

Projects

  • No projects to display.

Personal Tools