Commandeur & Koopman, State Space Time Series Analysis

A forum for students and teachers using RATS in a classroom setting

Commandeur & Koopman, State Space Time Series Analysis

Postby TomDoan » Thu Jun 28, 2012 1:01 pm

The attached zip has the examples and data sets from Commandeur & Koopman, An Introduction to State Space Time Series Analysis, Oxford University Press 2007. These are all examples of the use of the DLM instruction for analyzing state space models; in almost all cases, these are applications of structural time series models (local level or local trend with or without seasonality) which decompose a time series into the sum of two or more uncorrelated components. The examples are the most straightforward of any from the books that we have on the subject.

This book is available for purchase from Estima. For more information, see http://www.estima.com/textbook_commandeur.shtml.

commandeur-koopman.zip
Examples/data
(25.24 KiB) Downloaded 6 times


Example Description RATS Level
chapter1.rpf Descriptive statistics;graphs Basic
chapter2_norway.rpf Local level model, estimation of variances Intermediate
chapter2_uk.rpf Local level model Intermediate
chapter3_finland.rpf Local trend model, estimation, Kalman smoothing Intermediate
chapter3_uk.rpf Local trend model, estimation, Kalman smoothing Intermediate
chapter4_inflation.rpf UC model with seasonal Intermediate
chapter4_uk.rpf UC model with seasonal Intermediate
chapter5_uk.rpf Local level model with exogenous shift Intermediate
chapter6_uk.rpf Local level model with intervention variable Intermediate
chapter7_inflation.rpf Seasonal model with intervention variables Intermediate
chapter7_uk.rpf Seasonal model with exogenous shifts Intermediate
chapter8_nor_fin_forecast.rpf Local trend model, out-of-sample predictions Intermediate
chapter8_norway.rpf Local level model, out-of-sample predictions Intermediate
chapter8_uk_diags.rpf UC model with seasonal; diagnostics Intermediate
chapter8_uk_forecast.rpf UC model with seasonal; out-of-sample predictions Intermediate
chapter8_uk_missing.rpf UC model with seasonal; missing data handling Intermediate
chapter8_uk.rpf UC model with seasonal Intermediate
chapter9_bivariate.rpf Seasonal model with multiple observables Advanced
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

a spelling error?

Postby hardmann » Sun May 05, 2013 4:22 am

Dear Tom:
In code of Chapter 8 - Norway & Finland data, forecasts, commandure & koopman(2007), there is a spelling error.
In finland code:
nonlin sigsqeps sigsqxi=0.0 sigsqzeta
dlm(a=at,c=ct,sv=sigsqeps,f=ft,sw=%diag(||sigsqxi,sigsqzeta||),exact,y=logfinland,$
method=bfgs,yhat=vhat,svhat=svhat) * 2008:1 xstates vstates
set forecast 1970:3 2008:1 = %if(t<=2003:1,%scalar(yhat),%scalar(xstates(t)))
set fvariance 1970:3 2008:1 = %if(t<=2003:1,%scalar(svhat),%scalar(vstates(t)))

vhat and yhat should be same.


Best Regard.
Hardmann
hardmann
 
Posts: 48
Joined: Sat Feb 26, 2011 10:49 pm

Re: a spelling error?

Postby TomDoan » Sun May 05, 2013 8:33 pm

hardmann wrote:Dear Tom:
In code of Chapter 8 - Norway & Finland data, forecasts, commandure & koopman(2007), there is a spelling error.
In finland code:
nonlin sigsqeps sigsqxi=0.0 sigsqzeta
dlm(a=at,c=ct,sv=sigsqeps,f=ft,sw=%diag(||sigsqxi,sigsqzeta||),exact,y=logfinland,$
method=bfgs,yhat=vhat,svhat=svhat) * 2008:1 xstates vstates
set forecast 1970:3 2008:1 = %if(t<=2003:1,%scalar(yhat),%scalar(xstates(t)))
set fvariance 1970:3 2008:1 = %if(t<=2003:1,%scalar(svhat),%scalar(vstates(t)))

vhat and yhat should be same.


Best Regard.
Hardmann


Yes. It should read

dlm(a=at,c=ct,sv=sigsqeps,f=ft,sw=%diag(||sigsqxi,sigsqzeta||),exact,y=logfinland,$
method=bfgs,yhat=yhat,svhat=svhat) * 2008:1 xstates vstates
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to RATS for Teachers & Students

Who is online

Users browsing this forum: No registered users and 1 guest