State-space models with change points for regime shift detection in ecological time series

State-space models with explanatory variables can be used to detect change points in time series. In particular, this approach may be useful for detecting regime shifts and other kinds of changes in ecological time series (for example, the first principal component of a set of population abundances). The state-space approach is flexible enough to accomodate trends, step changes, and changes in trend, along with both process and observation error. The Matlab code below fits univariate, linear, Gaussian state-space models of this kind.

A paper on this work is in press at Global Change Biology.

Instructions for use

Download and unzip this Matlab code (creates directory rsstatespace). Change to this directory, start Matlab (requires the optimization and statistics toolboxes), and type example_script to run an example.

See README.txt in the zip file for more information.