Download presentation
Presentation is loading. Please wait.
Published byMarian Watts Modified over 8 years ago
1
Estimating the effects of covariates and seasonal effects in state-space models Applied Time Series Analysis for Ecologists Stockholm, Sweden24-28 March 2014
2
Topics for this afternoon Covariates, regressors, drivers o In the observation model o In the process model o In both obs & process models Seasonal, periodical effects
3
Types of covariates Numerical o Continuous (eg, temperature) o Discrete (eg, counts) Categorical o Before/After o North/South o January, February, March, …
4
Why include covariates in a model? Most ecologists are interested in explaining observed patterns Covariates can explain the process that generated the patterns http://www.nationalchickencouncil.org/
5
Covariates occur in state, obs or both State equation Observation equation (eg, nutrients affects growth) (eg, vegetation obscures individuals)
6
Covariates occur in state, obs or both State equation Observation equation (eg, temperature affects growth) (eg, temperature affects activity)
7
Can you spot the Anolis lizards? http://www.anoleannals.org/2012/12/14/anolis-allisoni-in-the-grass/
8
Covariates occur in state, obs or both State equation m rows k cols k rows 1 col m is number of states; k is number of covariates
9
Covariates occur in state, obs or both n rows k cols k rows 1 col n is number of obs; k is number of covariates Observation equation
10
Covariate effects can differ or not Different effectsSame effect
11
Covariates occur in state, obs or both Multivariate linear regression
12
Linear regression with AR(1) errors State equation Observation equation Use the state equation for autocorrelated errors The states are the observation errors
13
Linear regression on the state
14
Covariates can be seasons or periods State equation Observation equation
15
Seasonal or periodical effects For example, effects of “season” on 3 states WinterSpringSummerAutumnWinterSpringSummerAutumnWinterSpringSummerAutumn
16
Seasonal or periodical effects For example, effects of “season” on 3 states ctct
17
Seasonal or periodical effects For example, effects of “season” on 3 states c t+1
18
Non-factor seasons or periods We can also estimate “season” via a nonlinear model Two common options: 1)Cubic polynomial 2)Fourier frequency
19
Season as a polynomial For months:
20
Season as a Fourier series Fourier series are paired sets of sine and cosine waves They are commonly used in time series analysis in the frequency domain (which we will not cover here)
21
Season as a Fourier series Cc t = b 1 sin(2 t/p) + b 2 cos(2 t/p) t is time step; p is period
22
Dealing with missing covariates Drop years / shorten time series to remove missing values Interpolate missing values Develop process model for the covariates – Allows us to incorporate observation error into the covariates (known or unknown)
23
Dealing with missing covariates (v) are the variates (data) (c) are the covariates
24
And back to our MARSS form
25
What about the model likelihood? The log-likelihood of the expanded model includes the that for the covariate data If you want only the the log-likelihood of the non- covariate data, you need to subtract the log-likelihood of for the covariate model To do so, fit the expanded model, but pass missing values (NA’s) for the non-covariate data
26
Topics for the computer lab Covariates in models with: – only observation errors – with only process errors – with both observation & process errors Seasonal effects in models with both observation & process errors Missing covariates
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.