DOI: 10.6084/m9.figshare.3547218.v1
title: Supplement 1. Model implementation detail, R ,and WinBUGS code, and data for the Wood Thrush example presented in the paper.

description: File List carCJS.r - R script used to read in wood thrush data, create data objects for the spatial CJS model, specify the model in WinBUGS, call WinBUGS to run model and save output, and create ASCII grids for mapping ouput<br> woth.txt - Capture history file for wood thrush exampleDescription The 'carCJS.r' script requires the following R packages: boot, coda, deldir, gpclib, maptools, Matrix, R2WinBUGS, spam, spatstat, spdep, and tripack. The script reads in data; and creates a base 1-degree ASCII grid ('MAPSgrid.txt'), a model file for WinBUGS ('spatialcjs.txt'), and objects needed to run the model in WinBUGS. The script calls WinBUGS and stores output in an R list called 'out'. The script also creates objects for creating spatial maps of survival and residency (as in Fig. 3) within R and writes ASCII grids for making maps with GIS software outside of R. The data in 'woth.txt' are capture histories derived from the Monitoring Avian Productivity and Survivorship (MAPS) program. Included are all records of adult birds (i.e., ‘after-hatch-year’) of both sexes at stations where the species is known to breed. Fields in ‘woth.txt’ include: SPEC – Species 4-letter code. WOTH = wood thrush (<i>Hylocichla mustelina</i>) STA2 – MAPS station 4-character code. Stations consist of about 10 mist nets that sample an area of approximately 20 ha. Multiple stations &lt; 1 km apart were considered a single station BAND – USGS Bird Banding Laboratory band number R – Indicates whether predetermined resident (M) or not (U) Y1 – Indicator variable denoting whether captured (1) or not captured (0) in year 1. Y1 corresponds to 1992, the first year of the study (first year of standardized MAPS protocol) Y2 – Indicator variable denoting whether captured (1) or not captured (0) in year 2 (1993) Y3 – Indicator variable denoting whether captured (1) or not captured (0) in year 3 (1994) Y4 – Indicator variable denoting whether captured (1) or not captured (0) in year 4 (1995) Y5 – Indicator variable denoting whether captured (1) or not captured (0) in year 5 (1996) Y6 – Indicator variable denoting whether captured (1) or not captured (0) in year 6 (1997) Y7 – Indicator variable denoting whether captured (1) or not captured (0) in year 7 (1998) Y8 – Indicator variable denoting whether captured (1) or not captured (0) in year 8 (1999) Y9 – Indicator variable denoting whether captured (1) or not captured (0) in year 9 (2000) Y10 – Indicator variable denoting whether captured (1) or not captured (0) in year 10 (2001) Y11 – Indicator variable denoting whether captured (1) or not captured (0) in year 11 (2002) Y12 – Indicator variable denoting whether captured (1) or not captured (0) in year 12 (2003) LAT – Latitude of the MAPS station in decimal degrees LONG – Longitude of the MAPS station in decimal degrees CAP – Mean no. of within-year captures per individual at the station Note that although 6,645 birds are included in the woth.txt, only 6,241 of these birds that were captured for the first time prior to the last year of the study are read into the data object used in the model.