saving the estimated shocks

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.

saving the estimated shocks

Postby iacoviel » Wed Feb 01, 2006 6:54 pm

Dear all,

let me say upfront that I am not a big estimation expert.

I am estimating a model using Bayesian methods and would like the do the following experiment: after estimating the model, I would like to feed the estimated shocks back into the estimated model to run counterfactuals and historical decompositions.

What I am currently doing to implement this is the following:

1) During the estimation, I save the estimated shocks (which are stored by Dynare in the "innov" matrix) adding a line saying "save innov" around line 800 in the file dynare_estimation.m

2) After estimation, I simulate the estimated model replacing the "ex_" matrix inside the simult.m file with the "innov" matrix itself.

My understanding is that the innov are the smoothed shocks and do not replicate the model exactly when I feed them back in the model. In fact, model and actual series do not line up exactly. I was wondering whether there is a way conceptually and practically to do the counterfactuals in the model better than the one I am currently using

Thanks
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Postby MichelJuillard » Wed Feb 08, 2006 2:50 pm

You don't need to dig into dynare_estimation. After estimation, the smoothed shocks are available in dr_.posteriorSmoothedShocks

The simulation with the smoothed shocks should replicate exactly the observed variable. Be careful about ordering the variables. It isn't straightforward in simult_.m. Be careful about intercept, too.

You can send me your program or post it on the forum

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby iacoviel » Thu Feb 09, 2006 5:45 am

Hi Michel,

thanks for your tip. I will send you the file in the next days, once I have checked a few things. I just want to be sure about your point: should the smoothed shocks should replicate exactly the (1)actual variables or (2) the smoothed variables. It seems to me that (1) and (2) are not identical, and that the smoothed shocks replicate (2) not (1). But maybe I am missing something. I will keep you posted.

Matteo
iacoviel
 
Posts: 38
Joined: Wed Feb 01, 2006 6:25 pm

Postby MichelJuillard » Thu Feb 09, 2006 6:09 pm

In my exprerience the smoothed values of the observed variables are identical to the observations. If you have an example where it isn't the case, please send it to me

Best

Michel
MichelJuillard
 
Posts: 680
Joined: Thu Nov 18, 2004 10:51 am

Postby jmaih » Sat Feb 11, 2006 3:35 pm

If I may add something... Smoothed variables should correspond to actual variables when there are no measurement errors.

Junior
jmaih
 
Posts: 24
Joined: Tue Jan 17, 2006 6:12 pm


Return to Dynare help

Who is online

Users browsing this forum: Google [Bot] and 10 guests