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.

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)


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; 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 λ(cov, j), λ(j) and λ(pooled), 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.