DsgeSmoother - State Space of Durbin and Koopman

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

DsgeSmoother - State Space of Durbin and Koopman

Postby Aldo » Thu Mar 30, 2017 6:25 am

Hello dear all,
I am seeing that DsgeSmoother.m follows notation of Durbin/Koopman (2003):

y_t = Z*alpha_t + eps_t, ....................................... eps_ t ~ N(0,H)
apha_t+1 = T*alpha_t + R*eta_t, ............................. eta_t ~ N(0,Q)

I see in this function is computed Z, T, R, H, Q and alphahat and it returns as output alphahat, T and R among other elements.

I would like to modify DsgeSmoother.m in order to be able to get Z, T, R, H, Q and alphahat and I would like to include this in one structure, in M_. Could you please give me some advices to do this, maybe, what codes should I include?

By another side, I would like to know the order of variables included in apha_t, for example if I declare endogenous variables:

var x z x_obs z_obs
...
and after I declare observed variables:
varobs x_obs z_obs

Does It implies alpha will have this order = [x z x_obs z_obs ]?
And Does it implies y_t will have this order = [ x_obs z_obs ]?

Thanks a lot for your help

Aldo
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm

Re: DsgeSmoother - State Space of Durbin and Koopman

Postby jpfeifer » Thu Mar 30, 2017 7:05 am

That depends on the function your are calling first. In the unstable version, Dynare returns M_ as a function output. If your are using
Code: Select all
calib_smoother

any additional field passed to
Code: Select all
M_

should be returned.

Regarding the ordering, it should be in decision rule order. The code in
store_smoother_results

may be useful for sorting things out.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany

Re: DsgeSmoother - State Space of Durbin and Koopman

Postby Aldo » Fri Mar 31, 2017 4:32 am

Dear jpfeifer thank you very much for your help,
I am new in Dynare, so I apologize if my questions seems redundants.

1. I don't understand with
That depends on the function your are calling first.

Could you please give me more details?
If it is more complicated get Z, T, R, H, Q and alphahat as output saved in M_, I would like to retrieve these matrices after estimation with a simple .m.

2. By another side.
Regarding the ordering, it should be in decision rule order.


Where could I see decision rule orden? I appreciate very much your details, please. Is not urgent, but I would be wonderfull with details.

3. In Dynare 4.3.0. there was a

Code: Select all
M_.state_var


Where can I find this in Dynare 4.4.3?

Cheers

Aldo
Aldo
 
Posts: 56
Joined: Fri Aug 07, 2015 4:47 pm

Re: DsgeSmoother - State Space of Durbin and Koopman

Postby jpfeifer » Mon Apr 03, 2017 1:43 pm

1. The problem is that you have to make sure that the function that calls the smoother also returns the structure
Code: Select all
M_
where you want to store the additional objects from the smoother. The best way is to use the unstable version and call
Code: Select all
evaluate_smoother.m

in a
Code: Select all
verbatim

block.
2. The decision rule ordering is documented in the manual in section
4.13.2 Typology and ordering of variables

3. It should be in
Code: Select all
oo_.dr.state_var
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 6 guests