Dear List, I am building a zero inflated poisson model in MCMCglmm, and am experiencing some issues with my model, specifically with prior specification. My response variable is number of offspring per year, and is 85% zeros. My predictor variables are categorical: one has four levels (social style) and one has three levels (time period). The random effect is individual identity. My code is as follows: #### main effects model #### m1 <- MCMCglmm(N.OFFSPR.YR ~ trait-1 + at.level(trait,1):tp + at.level(trait,1):social.style, random=~us(trait):ANIMAL_ID, rcov=~us(trait):units, prior=prior_overdisp, data=rm, family="zipoisson", verbose=FALSE, burnin = 15000, pl = TRUE, singular.ok=TRUE, nitt=40000, thin = 20) #### interaction model #### m2 <- MCMCglmm(N.OFFSPR.YR ~ trait-1 + at.level(trait,1):tp + at.level(trait,1):social.style*tp + at.level(trait,1):social.style, random=~us(trait):ANIMAL_ID, rcov=~us(trait):units, prior=prior_overdisp, data=rm, family="zipoisson", verbose=FALSE, burnin = 15000, pl = TRUE, singular.ok=TRUE, nitt=40000, thin = 20) with prior as follows: prior_overdisp <- list(R=list(V=diag(c(1,1)),nu=0.002, fix=2),G=list(list(V=diag(c(1,1e-6)),nu=0.002, fix=2))) as described by Bolker et al (2012) in their Owl example paper. Originally, another variable was included in both these models, which was continuous (year of life). Both models ran with no issues when this variable was included - the model converged and chains mixed well. I no longer wish to include the continuous variable though, and without it neither model runs. I get the error message: Mixed model equations singular: use a (stronger) prior I don't know what to make of this, and am loathe to mess around with my prior specification without fully understanding what it is I am doing. I would be very grateful for any help and direction in the matter! Many thanks, Beki (master's student extremely new to bayesian stats)
MCMCglmm zero inflated poisson model issue
2 messages · Rebecca Hooper, Jarrod Hadfield
1 day later
Hi, The two reasons are most likely: a) you are trying to estimate the residual covariance, for which there is no information in the data, you are trying to estimate the between-individual covariance for which there is information but given you have set the between-individual variance in zero-inflation to zero you don't want to estimate. Replacing us() with idh() resolves these issues. b) you have the argument singular.ok=TRUE. This will retain non-identifiable contrasts, but you certainly want to drop them so just use the default. Cheers, Jarrod
On 24/11/2016 14:35, Rebecca Hooper wrote:
Dear List, I am building a zero inflated poisson model in MCMCglmm, and am experiencing some issues with my model, specifically with prior specification. My response variable is number of offspring per year, and is 85% zeros. My predictor variables are categorical: one has four levels (social style) and one has three levels (time period). The random effect is individual identity. My code is as follows: #### main effects model #### m1 <- MCMCglmm(N.OFFSPR.YR ~ trait-1 + at.level(trait,1):tp + at.level(trait,1):social.style, random=~us(trait):ANIMAL_ID, rcov=~us(trait):units, prior=prior_overdisp, data=rm, family="zipoisson", verbose=FALSE, burnin = 15000, pl = TRUE, singular.ok=TRUE, nitt=40000, thin = 20) #### interaction model #### m2 <- MCMCglmm(N.OFFSPR.YR ~ trait-1 + at.level(trait,1):tp + at.level(trait,1):social.style*tp + at.level(trait,1):social.style, random=~us(trait):ANIMAL_ID, rcov=~us(trait):units, prior=prior_overdisp, data=rm, family="zipoisson", verbose=FALSE, burnin = 15000, pl = TRUE, singular.ok=TRUE, nitt=40000, thin = 20) with prior as follows: prior_overdisp <- list(R=list(V=diag(c(1,1)),nu=0.002, fix=2),G=list(list(V=diag(c(1,1e-6)),nu=0.002, fix=2))) as described by Bolker et al (2012) in their Owl example paper. Originally, another variable was included in both these models, which was continuous (year of life). Both models ran with no issues when this variable was included - the model converged and chains mixed well. I no longer wish to include the continuous variable though, and without it neither model runs. I get the error message: Mixed model equations singular: use a (stronger) prior I don't know what to make of this, and am loathe to mess around with my prior specification without fully understanding what it is I am doing. I would be very grateful for any help and direction in the matter! Many thanks, Beki (master's student extremely new to bayesian stats) [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.