Supplement 1. R and OpenBUGS code and data for fitting a linked zero-inflated negative binomial model applied to counts of legally sized snapper from a marine reserve monitoring program.
收藏WILEY2016-08-09 更新2026-04-17 收录
下载链接:
https://wiley.figshare.com/articles/dataset/Supplement_1_R_and_OpenBUGS_code_and_data_for_fitting_a_linked_zero-inflated_negative_binomial_model_applied_to_counts_of_legally_sized_snapper_from_a_marine_reserve_monitoring_program_/3554706/1
下载链接
链接失效反馈官方服务:
资源简介:
File List Linked_zero-inflated_model_for snapper.R (md5: 531da87c73774928b5d5814cf397bcf3) Description This Supplement provides code and data for applying a linked zero-inflated negative binomial model to counts of legally sized snapper. Both the analysis and data are provided as R (R Development Core Team 2012) code in one file. It is necessary to have installed the R library R2OpenBUGS (Sturtz et al. 2005) and the OpenBUGS software for this code to work. The model coded below may superficially appear to be different to the model described in Appendix A. This is because the model below was parameterized using hierarchical centering (Browne 2004), which may improve convergence of the MCMC chains. The models are equivalent. Zero-inflated distributions are essentially mixture distributions. Parameterizing the likelihood of such a model by utilizing a latent Bernoulli parameter for zero-inflation (e.g. the "data-augmentation" approach used by Ghosh et al. 2006), can render the plug-in estimates of the Deviance Information Criterion (DIC) inappropriate (Lawson and Clark 2002). For the models presented in this paper, we used the "zeros trick" and specified explicitly the likelihood of the models (rather than using the built-in distributions available within OpenBUGS), thus marginalizing over observation-level latent parameters. We found this approach to have several advantages over the alternative. First, avoiding the use of observation- level latent parameters meant that the plug-in DIC could be expected to be perform well as a model selection criterion (Millar 2009). Second, we found that the models ran more successfully when specified in this way, encountering fewer errors and achieving better mixing of the MCMC chains.
创建时间:
2016-08-09



