Chapter 9 Dynamic linear models

Dynamic linear models (DLMs) are a type of linear regression model, wherein the parameters are treated as time-varying rather than static. DLMs are used commonly in econometrics, but have received less attention in the ecological literature (c.f. Lamon, Carpenter, and Stow 1998; Scheuerell and Williams 2005). Our treatment of DLMs is rather cursory—we direct the reader to excellent textbooks by Pole, West, and Harrison (1994) and Petris, Petrone, and Campagnoli (2009) for more in-depth treatments of DLMs. The former focuses on Bayesian estimation whereas the latter addresses both likelihood-based and Bayesian estimation methods.

A script with all the R code in the chapter can be downloaded here. The Rmd for this chapter can be downloaded here.

Data

Most of the data used in the chapter are from the MARSS package. Install the package, if needed, and load:

library(MARSS)

The problem set uses an additional data set on spawners and recruits (KvichakSockeye) in the atsalibrary package.