Hello dear all,
I want to use the state space representation from a DSGE model to get fan charts (predictives densities) using dynare.
In order to do this, I need one state space, like this:
I am using notation from Koopman and Durbin: “Filtering and smoothing of state vector for difuse state space models”.
With this representation I will get several paths of forecasts by simulation, and after that I will compute percentiles of simulations to plot fan charts.
Also I am needing alpha_0 which must be the smoothed estimate in end of the sample.
My questions are:
How could I retrieve Z, H, T, R and Q?, and How could I check order of variables in y_t and alpha_t? I hope to get in y_t (alpha_t) variables in the same order of declared observed variables (declared endogenous variables) in .mod.
Thanks dear jpfeifer,
I saw the manual, and I after run my .mod I see output oo_.PointForecast.deciles. In order to plot my fan chart I would like to have output of complete simulation and not only deciles, for example I would like to compute percentiles.
I have another question, what is the dynare function which compute deciles of forecast?
And finally, I am running a DSGE-VAR, and I include forecast option in estimation command.
I would like to know if oo_.PointForecast.deciles is output of DSGE or DSGE-VAR? I ask this because I am not sure if dynare computes forecast for DSGE-VAR?
computes the deciles. In principle, you can easily access the saved forecasts across draws in the metropolis-subfolder in the FILENAME_forc_point*.mat-files.
At the current stage, forecasts are from the DSGE-model, not the VAR. It is on our to-do list, but we haven’t managed to do it yet. See github.com/DynareTeam/dynare/issues/819. A year ago a user started working on it, but it went nowhere as far as I know. But maybe it is helpful: [Writtng a dsgevar_forecast function)
Im having a hard time trying solve question 1 by Aldo - retrieving Z, H, T, R and Q (Durbin Koopman DK notation) from dynare output
I was reading all the state space representation posts, but Im still confused about the ABCD form and the one of DK notation. In ABCD_test.m, the matrix D is returned, but in my case it would be a just a identity matrix (or just a zero matrix in some cases). How to solve this issue? writing the state space matrix as DK notation using dynare output?
[A,B] = kalman_transition_matrix(oo_.dr,ipred,1:M_.nspred); works for the transition equation. but what about the observation equation