State-space representation questions

41 views
Skip to first unread message

Panos Tsapatoris

unread,
Oct 14, 2011, 12:56:31 PM10/14/11
to iris-toolbox-discussion
Good evening to all.
I have a query concerning the state-space representation.

I have run my model (a DSGE) and computed the state-state
representation,using the sspace function,yet I am unable to find the
separate tables (T,R,K..etc) that are listed in the API.
Where can I find them?
And second,how can I compute the unconditional variance of a variable
using the state-space representation?

Thank you in advance,

Panos Tsapatoris

Jaromir Benes

unread,
Oct 14, 2011, 1:06:51 PM10/14/11
to iris-t...@googlegroups.com
Hi Panos:

1. The state-space representation is, in fact, computed when you run the |solve| function. Then, you can retrieve the state-space matrices using the |sspace| function. In other words, in non-linear models you need to run the following sequence (I'm just using the plain forms of the commands, without any user options specified...)

    m = sstate(m); 
    m = solve(m);
    [T,R,K,Z,H,D,U,Omg] = sspace(m);

Note that the state-space form is rotated, with the state-space vector being a transformation of the original vector of variables. The transformation is chosen so to obtain a upper quasi-traingular transition matrix T (which is computationally more efficient in many contexts then...)

To get a state-space form for the original vector of variables, you need to call the |sspace| function with the following option:

    [T,R,K,Z,H,D,U,Omg] = sspace(m,'triangular=',false);

2. To get the unconditional (auto-)covariance and (auto-)correlation function up to k-th order, just use the |acf| function:

   [C,R] = acf(m,'order=',k);
 
where |C| is (auto-)covariances and |R| is (auto-)correlations for all measurement and transition variables. The variables in the individual rows and columns can be then retrieved by 

    rownames(C)
    colnames(C)

or you can use the select function to get just a submatrix. E.g.

    select(C,{'x','y','z'})

will return an (auto-)covariance submatrix for three variables named x, y, z.

Best
Jaromir

Reply all
Reply to author
Forward
0 new messages