Supplement 1. R scripts for fitting the base- and full-model structures to sample data.
收藏Figshare2016-08-10 更新2026-04-29 收录
下载链接:
https://figshare.com/articles/dataset/Supplement_1_R_scripts_for_fitting_the_base-_and_full-model_structures_to_sample_data_/3563916
下载链接
链接失效反馈官方服务:
资源简介:
File List run_base_full_models.R (MD5: adc930d6094b52c44838c1530c662920) base_model.txt (MD5: 36b6b952b0c31b1921cee7a53e48b83a) full_model.txt (MD5: 211e7b9afd6bc402f307653661e168ab) jags_data.Rd (MD5: b10e52de46c11eeb2477960681a631e6) viterbi_funs.R (MD5: 7d6e8db0684738d8ea1722c95b8c7eba) Description The code included in run_base_full_models.R fits the 'base' and 'full' models described in the main text (Table 2). The base model (Model structure 2) is fitted with 5 states and fixed step length (FS). The full model (Model structure 9) is fitted with 6 states and time-varying step length (TS). The script then calls Viterbi_funs.R to estimate the Viterbi sequence of states based upon the posterior state-dependent parameter estimates. Running the script requires jags software (freely available at http://mcmc-jags.sourceforge.net/) and the r package 'R2jags'. Sample data, priors, and example R2jags fitting objects are supplied in jags_data.Rd which can be directly loaded into r. The text files contain the model structures in jags script. To run the script, place all the files into your r working directory.
创建时间:
2016-08-10



