6 Lab 5 - Dynamic Linear Models
Teams
Liz Elmstrom (SAFS), Dylan Hubl (SEFS), Maria Kuruvilla (QERM)
Terrance Wang (SAFS), Zoe Rand (QERM)
Eric French (CEE), Madison Shipley (SAFS), Karl Veggerby (SAFS)
Nick Chambers (SAFS), Emma Timmins-Schiffman (Genome Sci), Miranda Mudge (Molecular & Cellular)
Background
For the lab this week we will use DLM’s to examine some of the time-varying properties of the spawner-recruit relationship for Pacific salmon. Much work has been done on this topic, particularly by Randall Peterman and his students and post-docs at Simon Fraser University. To do so, researchers commonly use a Ricker model because of its relatively simple form, such that the number of recruits (offspring) born in year
The parameter
Substituting
Unfortunately, however, residuals from this simple model typically show high-autocorrelation due to common environmental conditions that affect overlapping generations. Therefore, to correct for this and allow for an index of stock productivity that controls for any density-dependent effects, the model may be re-written as
and
More recently, interest has grown in using covariates (
In this case we are estimating some base-level productivity (
Spawner-recruit data
The data come from a large public database begun by Ransom Myers many years ago. If you are interested, you can find lots of time series of spawning-stock, recruitment, and harvest for a variety of fishes around the globe. The website is here.
For this exercise, we will use spawner-recruit data for sockeye salmon (Oncorhynchus nerka) from the Kvichak River in SW Alaska that span the years 1952-1989. In addition, we’ll examine the potential effects of the Pacific Decadal Oscillation (PDO) during the salmon’s first year in the ocean, which is widely believed to be a “bottleneck” to survival.
These data are in the atsalibrary package on GitHub. If needed, install using the devtools package.
Code
## library(devtools)
## Windows users will likely need to set this
## Sys.setenv("R_REMOTES_NO_ERRORS_FROM_WARNINGS" = "true")
::install_github("nwfsc-timeseries/atsalibrary") devtools
Load the data.
Code
data(KvichakSockeye, package="atsalibrary")
<- KvichakSockeye SR_data
The data are a dataframe with columns for brood year (brood_year
), number of spawners (spawners
), number of recruits (recruits
) and PDO at year pdo_summer_t2
) and in winter (pdo_winter_t2
).
Code
## head of data file
head(SR_data)
brood_year spawners recruits pdo_summer_t2 pdo_winter_t2
1 1952 NA 20200 -2.79 -1.68
2 1953 NA 593 -1.20 -1.05
3 1954 NA 799 -1.85 -1.25
4 1955 NA 1500 -0.60 -0.68
5 1956 9440 39000 -0.50 -0.31
6 1957 2840 4090 -2.36 -1.78
Resources
Lab materials from April 20 [online here]
Chapter 10 Dynamic Factor Analysis. ATSA Lab Book. [online here]