Supplement 1. Annotated INLA code for the model with snow cover extent from 1967–2010.

posted on 04.08.2016 by Beth .E Ross, Mevin B. Hooten, Jean-Michel DeVink, David N. Koons

File List

INLA_code.R (MD5: 68c372169a851d7616d30172ce203f50)

ss_model_inla.csv (MD5: 3b3bf472211df425134b22e33dbac549)


INLA_code.R is an R script file to analyze scaup pair abundance using a Gompertz state-space model containing a covariate for snow cover extent. This script assumes that the INLA package has been downloaded from http://www.r-inla.org. The data set (ss_model_inla.csv) should be in the working directory when running this code.

ss_model_inla.csv is a comma-separated text file containing the scaup dataset. Column definitions are:

  1. y: counts from each stratum in each year from BPOP aerial survey
  2. stratum: each stratum number, adjusted for analysis in INLA, where ‘1’ = Stratum 13 as defined by the BPOP survey, ‘2’ = Stratum 14, ‘3’ = Stratum 15, ‘4’ = Stratum 16, ‘5’ = Stratum 17, and ‘6’ = Stratum 18
  3. year: year since beginning of survey (1955)
  4. stand.snow: standardized covariate for snow cover extent
  5. N: number of segments flown in each stratum each year