Supplement 1. Requisite data and R script files necessary to conduct the simulation study and perform analyses of ice-associated seal densities in the Bering Sea.
收藏DataCite Commons2020-09-03 更新2024-07-25 收录
下载链接:
https://wiley.figshare.com/articles/dataset/Supplement_1_Requisite_data_and_R_script_files_necessary_to_conduct_the_simulation_study_and_perform_analyses_of_ice-associated_seal_densities_in_the_Bering_Sea_/3557955/1
下载链接
链接失效反馈官方服务:
资源简介:
File List 1. MCMC_simple.r (MD5: e4e851bf6ceed824025ae6f5f7d414cc) 2. run_sims_double.r (MD5: ca75d138f8ef241ca1427d6e6ff70399) 3. run_sims_double_PO.R (MD5: 49dce2eaee28bfd2640405a9bbea0a1c) 4. run_sims_double_Mis.R (MD5: 25f00cb61b9e943cc6414ffaca9f01ef) 5. run_sims_single.R (MD5: dd43419d1e359e2b9348ba3cc6b51715) 6. run_double_only_hab.R (MD5: 3fdd916184d710f198f081d41f986e95) 7. run_double_only_nohab.R (MD5: 2c264f955d2e2911508a0cf58eb07cc1) 8. run_double_only_pooled.R (MD5: be47889c03d27aab86ace13dc279a5ac) 9. PolarData_Bins234.RData (MD5: 85faa1757702073f34f3525b70816bf3) 10. Statistics_OnEffort_ByEvent.csv (MD5: cb2fa96fc0627d412b2b85327fe63262) 11. ObsInfo.csv (MD5: 27027e601f80d14895d51d98fc90a206) 12. Scale.csv (MD5: a4e223f8fcf3063ba2c8236b697ac52b) Description The simulation study uses six R scripts to simulate data and perform MCMC. As suggested by their names, the scripts run_sims_single.R, run_sims_double.r, run_sims_double_PO.R, and run_sims_double_Mis.R are essentially drivers to run simulations for single observer surveys, double observer surveys (with both misclassification and "unknown" species), double observer surveys with partial species observation, and double observer surveys with misclassification (but no unknown species category), respectively. These scripts call functions to simulate and analyze data, all of which are included in MCMC_simple.r. The seal analysis relies heavily on the R package, hierarchicalDS (v2.0), which is available as a supplementary .zip file, as well on the comprehensive R archive network (CRAN; cran.r-project.org). The package contains all additional requisite R code together with help files. The scripts, run_double_only_hab.R, run_double_only_nohab.R, and run_double_only_pooled.R format data and call hierarchicalDS to run models λ(<i>cov, j</i>), λ(<i>j</i>) and λ(<i>pooled</i>), respectively. Each of these scripts references several data files. In particular, PolarData_Bins234.Rdata includes double observer data, where each row represents a different observation, and columns consist of "Transect" (transect identifier; transects 1–19 included double observers), "Match" (which delineates individual groups of seals), "Observer" (a factor variable giving observer ID), "Obs" (= TRUE if the observer saw the group of seals and FALSE otherwise), "Species" (an integer giving the species seen; 0 = missed, 1 = bearded, 2 = ribbon, 3 = ringed, 4 = spotted, 5 = unknown), Alt.500 (an indicator for whether altitude own was 500 feet (Alt.500 = 1), or 400 feet (Alt.500 = 0), "Pos" (an indicator for whether the observation was made in the back seat (Pos = 1) or front seat (Pos = 0), "Distance" (distance bin 2, 3, or 4), and "Group" (integer giving the number of individuals associated with the current observation). We use data from the field "SumOfSumOfElapDist" in file Statistics_OnEffort_ByEvent.csv to give distance (in km) for each transect; data from the fields "Event", "Side," and "Observer" in the file ObsInfo.csv provide information on the transect, seat in the aircraft (L = left [not used in the analysis], R = front seat, S = back seat), and observer ID associated with each transect; data from the fields Bin, Altitude, and BinWidth_m from the file Scale.csv provide information on the relative bin width (in m) for different bins and altitudes.
文件列表
1. MCMC_simple.r(MD5: e4e851bf6ceed824025ae6f5f7d414cc)
2. run_sims_double.r(MD5: ca75d138f8ef241ca1427d6e6ff70399)
3. run_sims_double_PO.R(MD5: 49dce2eaee28bfd2640405a9bbea0a1c)
4. run_sims_double_Mis.R(MD5: 25f00cb61b9e943cc6414ffaca9f01ef)
5. run_sims_single.R(MD5: dd43419d1e359e2b9348ba3cc6b51715)
6. run_double_only_hab.R(MD5: 3fdd916184d710f198f081d41f986e95)
7. run_double_only_nohab.R(MD5: 2c264f955d2e2911508a0cf58eb07cc1)
8. run_double_only_pooled.R(MD5: be47889c03d27aab86ace13dc279a5ac)
9. PolarData_Bins234.RData(MD5: 85faa1757702073f34f3525b70816bf3)
10. Statistics_OnEffort_ByEvent.csv(MD5: cb2fa96fc0627d412b2b85327fe63262)
11. ObsInfo.csv(MD5: 27027e601f80d14895d51d98fc90a206)
12. Scale.csv(MD5: a4e223f8fcf3063ba2c8236b697ac52b)
描述
本仿真研究共包含6个R脚本,用于数据仿真与马尔可夫链蒙特卡洛(Markov Chain Monte Carlo, MCMC)分析。顾名思义,脚本run_sims_single.R、run_sims_double.r、run_sims_double_PO.R与run_sims_double_Mis.R分别为单观察者调查、兼具误分类与"未知"物种场景的双观察者调查、部分物种观测场景双观察者调查、仅存在误分类(无未知物种类别)场景双观察者调查的仿真运行驱动程序。上述脚本均调用内嵌于MCMC_simple.r中的函数完成数据仿真与分析任务。
本次海豹数据分析高度依赖hierarchicalDS(v2.0)R包,该包可作为补充压缩包获取,亦可通过R综合存档网络(Comprehensive R Archive Network, CRAN; cran.r-project.org)下载。包内包含所有必要的附加R代码与帮助文档。
脚本run_double_only_hab.R、run_double_only_nohab.R与run_double_only_pooled.R用于数据格式化,并分别调用hierarchicalDS运行λ(cov, j)、λ(j)与λ(pooled)三类模型。每个脚本均引用多个数据文件。具体而言,数据文件PolarData_Bins234.Rdata存储双观察者调查数据,每行代表一条独立观测记录,各字段含义如下:
- "Transect":样带标识符(样带1至19采用双观察者设计);
- "Match":海豹个体群的划分依据;
- "Observer":记录观察者ID的因子型变量;
- "Obs":布尔变量,观察者观测到海豹群时为TRUE,否则为FALSE;
- "Species":观测物种的整数编码:0代表未观测到,1为髯海豹,2为带纹海豹,3为环斑海豹,4为斑海豹,5为未知物种;
- "Alt.500":飞行高度标识,Alt.500=1表示飞行高度为500英尺,=0则为400英尺;
- "Pos":观测座位标识,Pos=1代表观测位于后座,=0则代表位于前座;
- "Distance":距离分区(取值为2、3或4);
- "Group":当前观测对应的海豹个体总数的整数值。
本研究使用Statistics_OnEffort_ByEvent.csv文件中"SumOfSumOfElapDist"字段的数据,计算每条样带的距离(单位:千米);从ObsInfo.csv文件的"Event"、"Side"与"Observer"字段中,可获取每条样带对应的样带编号、飞机座位信息(L为左侧座位[分析中未使用],R为前座,S为后座)以及观察者ID;从Scale.csv文件的Bin、Altitude与BinWidth_m字段中,可获取不同分区与高度下的相对分区宽度(单位:米)。
提供机构:
Wiley
创建时间:
2016-08-10



