Interpreting mcmc output using glmmadmb

无人久伴 提交于 2019-12-08 03:57:46

问题


I'm trying to evaluate the output from a negative binomial mixed model using glmmadmb. To summarize the output I'm comparing the summary function with output forom the mcmc option. I have run this model:

         pre1 <- glmmadmb(walleye~(1|year.center) + (1|Site) ,data=pre,    
             family="nbinom2",link="log",
             mcmc=TRUE,mcmc.opts=mcmcControl(mcmc=1000))

I have two random intercepts: year and site. Year has 33 levels and site has 15.

The random effect parameter estimate for site and year from summary(pre1) do not seem to agree with the posterior distribution from the mcmc output. I am using the 50% confidence interval as the estimate that should coincide with the parameter estimate from the summary function. Is that incorrect? Is there a way to obtain an error around the random effect parameter using the summary function to gauge whether this is variance issue? I tried using postvar=T with ranef but that did not work. Also, Is there a way to format the mcmc output with informative row names to ensure I'm using the proper estimates?

summary output from glmmabmb: summary(pre1)

Call:
glmmadmb(formula = walleye ~ (1 | year.center) + (1 | Site), 
data = pre, family = "nbinom2", link = "log", mcmc = TRUE, 
mcmc.opts = mcmcControl(mcmc = 1000))

AIC: 4199.8 

Coefficients:
        Estimate Std. Error z value Pr(>|z|)    
 (Intercept)    3.226      0.154      21   <2e-16 ***

 Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Number of observations: total=495, year.center=33, Site=15 
Random effect variance(s):
Group=year.center
             Variance StdDev
 (Intercept)   0.1085 0.3295
 Group=Site
             Variance StdDev
 (Intercept)   0.2891 0.5377

 Negative binomial dispersion parameter: 2.0553 (std. err.: 0.14419)

 Log-likelihood: -2095.88 

mcmc output: m <- as.mcmc(pre1$mcmc) CI <- t(apply(m,2,quantile,c(0.025,0.5,0.975)))

                    2.5%          50%         97.5%
(Intercept)  2.911667943  3.211775843  3.5537371345
tmpL.1       0.226614903  0.342206509  0.4600328729
tmpL.2       0.395353518  0.554211483  0.8619127547
alpha        1.789687691  2.050871824  2.3175742167
u.01         0.676758365  0.896844797  1.0726750539
u.02         0.424938481  0.588191585  0.7364795440

these estimates continue to u.48 to include year and site specific coefficients.

Thank you in advance for any thoughts on this issue. Tiffany


回答1:


The random effect parameter estimate for site and year from summary(pre1) do not seem to agree with the posterior distribution from the mcmc output. I am using the 50% confidence interval as the estimate that should coincide with the parameter estimate from the summary function. Is that incorrect?

It's not the 50% confidence interval, it's the 50% quantile (i.e. the median). The point estimates from the Laplace approximation of the among-year and among-site standard deviations respectively are {0.3295,0.5377}, which seem quite close to the MCMC median estimates {0.342206509,0.554211483} ... as discussed below, the MCMC tmpL parameters are the random-effects standard deviations, not the variances -- this might be the main cause of your confusion?

Is there a way to obtain an error around the random effect parameter using the summary function to gauge whether this is variance issue? I tried using postvar=T with ranef but that did not work.

The lme4 package (not the glmmadmb package) allows estimates of the variances of the conditional modes (i.e. the random effects associated with particular levels) via ranef(...,condVar=TRUE) (postVar=TRUE is now deprecated). The equivalent information on the uncertainty of the conditional modes is available via ranef(model,sd=TRUE) (see ?ranef.glmmadmb).

However, I think you might be looking for the $S (variance-covariance matrices) and $sd_S (Wald standard errors of the variance-covariance estimates) instead (although as stated above, I don't think there's really a problem).

Also, Is there a way to format the mcmc output with informative row names to ensure I'm using the proper estimates?

See p. 15 of vignette("glmmADMB",package="glmmADMB"):

The MCMC output in glmmADMB is not completely translated. It includes, in order:

  • pz zero-inflation parameter (raw)
  • fixed effect parameters Named in the same way as the results of coef() or fixef().
  • tmpL variances (standard-deviation scale)
  • tmpL1 correlation/off-diagonal elements of variance-covariance matrices (off-diagonal elements of the Cholesky factor of the correlation matrix'). (If you need to transform these to correlations, you will need to construct the relevant matrices with 1 on the diagonal and compute the cross-product, CC^T (see tcrossprod); if this makes no sense to you, contact the maintainers)
  • alpha overdispersion/scale parameter
  • u random effects (unscaled: these can be scaled using the estimated random-effects standard deviations from VarCorr())


来源:https://stackoverflow.com/questions/20224717/interpreting-mcmc-output-using-glmmadmb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!