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 ofcoef()
orfixef()
.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 (seetcrossprod
); if this makes no sense to you, contact the maintainers)alpha
overdispersion/scale parameteru
random effects (unscaled: these can be scaled using the estimated random-effects standard deviations fromVarCorr()
)