image_thumb[5]

State Space Methodology serves as an umbrella for representing many univariate, multivariate stationary and non stationary time series. For those who have never heard of a "State Space Model" but have used some software for any time series model parameter estimation, the motivation is this : It is likely that the software used has a state space representation of the model in the implementation. For example, in R, the implementation for the function arima() says,

The exact likelihood is computed via a state-space representation of the ARIMA process, and the innovations and their variance found by a Kalman filter. The initialization of the differenced ARMA process uses stationarity and is based on Gardner et al. (1980). For a differenced process the non-stationary components are given a diffuse prior (controlled by kappa). Observations which are still controlled by the diffuse prior (determined by having a Kalman gain of at least 1e4) are excluded from the likelihood calculations. (This gives comparable results to arima0 in the absence of missing values, when the observations excluded are precisely those dropped by the differencing.)

A model as simple as AR(1) for which OLS might suffice is also cast as a state space model in R. Why do you think so? What are the specific advantages of representing many econometric models in the form of state variable equations?. For a  econometrics newbie, to make sense of the above description for the R function, would mean that he/she understands the importance of Kalman filter in the following aspects :

  • Predicting
  • Filtering
  • Estimating
  • Forecasting

This book does not explain all the gory details of Kalman Filter as the authors make it very clear in the introduction that the content in the book is meant to serve only as an appealing introduction to time series using state space methods. The book does even assume that the reader is conversant with  Box Jenkins type of informal time series analysis . All a reader is expected to know  is some classic linear regression fundas. Time Series analysis has the primary task to uncover the dynamic evolution of the observations measured over time. It is assumed that the dynamic properties cannot be observed directly from data. The unobserved dynamic process at time t is referred to as the state of the time series. The state of a time series may consist of several components. The book is organized in such each chapter deals with one such component.

The first seven chapters of the book are meant to give the reader a preliminary understanding of some state space models. The first six chapters explore one or more combinations of state variables that find a place in the final model in chapter 7. The components explored in the chapters leading to the final model are

  • Stochastic Level
  • Stochastic Trend
  • Seasonality
  • Intervention Variables
  • Explanatory variables

The model described in chapter 7 combines all the above components and hence in order to understand all  the aspects of final model, it is better to go over all the preliminary chapters. I don’t think how anyone can merely read up the chapters and numbers given, like a novel.  If you see a bunch of numbers for any model, natural inclination would be either to  run the code that goes along with it(if the authors have provided) or  at least make an effort to get close to verifying them by writing your own code. So, in that sense if some one merely reads the first seven chapters like a novel, I guess the understanding will be somewhat shallow.Having said that, the authors should have pushed the first seven chapters after chapter 10 where they introduce the software that they have used to generate numbers and visuals.  Actually , the book should have started with chapter 8 that provides the general framework and then connect various models with in that framework. Well, who can say what’s the right way to introduce a subject?. May  be seeing a bunch of models and visuals might be motivating for some readers.

In my opinion, it is better to start reading chapter 8 that provides the basic equation of a state space model.There are many notations for state space framework and I am comfortable with the following notation, that is different from the one mentioned in the book.My mind is used to seeing F and G matrices and so I tend to stick with this representation.

image_thumb[2]

The first is the observation equation and second is the state equation. All the models discussed in the first seven chapters can be represented in the above form and hence one can use Kalman filter algo for estimating, filtering , smoothing and forecasting.In chapter 10, the authors mention the software used for the analysis. The authors use SsfPack and Ox to churn out the numbers and visuals. SsfPack  is basically a bunch of  C routines that can be linked to Ox software. Never have I used the above software and hence went about doing the analysis in R . There are at least five to six CRAN packages that are targeted towards state space models. However the one I found the most easy to understand is the dlm package. In fact the contributors of the package have written a fantastic book on the same.Will blog about it someday soon.

Useful link :

image_thumb[9] Takeaway :

This book serves as an excellent primer to state space models. However having some preliminary knowledge of Kalman filter helps in getting to understand the content well. One thing missing in this book is the mention of MCMC sampling. The standard approach to estimation of parameters in the model is MLE. However there is an alternative method: use MCMC to get a posterior distribution of the entire state vector and parameter space. This approach is not dealt in this book for obvious reasons. In fact one can try to verify all the numbers mentioned in the book from a Bayesian perspective, i.e use Gibbs sampling to generate the posterior distribution and check whether the model estimates and state vector estimates fall in the credible interval of the marginal posterior distribution of the parameter. That would be an interesting exercise to do and check one’s understanding of Bayesian analysis and state space models.

Advertisements