Supplement 1. R code to implement the Metropolis-Hastings algorithm.
收藏DataCite Commons2020-09-03 更新2024-07-25 收录
下载链接:
https://wiley.figshare.com/articles/dataset/Supplement_1_R_code_to_implement_the_Metropolis-Hastings_algorithm_/3544556
下载链接
链接失效反馈官方服务:
资源简介:
File List carlson_etal_ecology_supplement_Rscript.txt Description This is a text file containing annotated R code to fit the Bayesian model for the survival function based on the pre-winter and post-winter inverse Gaussian length distributions. The code implements the Metropolis-Hastings algorithm to sample from the posterior distribution of the three parameters of the model. In particular, the output includes posterior samples for parameters “mu” and “phi” (the mean and shape parameter, respectively, of the pre-winter length distribution) and for "alpha" (the parameter of the survival function). These posterior samples can be used, as described in the paper, to plot point and interval estimates for the survival function and for the pre-winter and post-winter length densities.
文件列表:carlson_etal_ecology_supplement_Rscript.txt
描述:本文本文件内含带注释的R代码,用于基于冬前与冬后逆高斯(inverse Gaussian)长度分布拟合生存函数的贝叶斯模型。该代码实现了Metropolis-Hastings算法,可从模型的三个参数的后验分布中进行采样。具体而言,其输出包含参数"μ"(即冬前长度分布的均值)、"φ"(即冬前长度分布的形状参数)以及生存函数参数"α"的后验采样结果。如论文所述,这些后验采样结果可用于绘制生存函数、冬前与冬后长度密度的点估计与区间估计。
提供机构:
Wiley
创建时间:
2016-08-05



