Page 1 of 1
Three Questions about estimation and simulating data
Posted:
Thu Jul 10, 2008 4:46 pm
by bigbigben
Hi, Guys:
I am sorry I just throw the questions here, instead of searching for the answers myself.
First, is there an option in Dynare that I can simulate the whole series of observed data based on the identified shock in the estimation. The purpose is to contrast the model generated data and the actual observations.
Second, it is about the smoothed shock figures popping out after estimation. What is the smoothing filter used in it ?
Third, when I use Bayesian Method embodied in Dynare sometime, some figures are spit out as the univariate diagnostics. It doesn't happen all the time. How to read the figures and is it a sign of bad fitting ?
Thanks for your input
Best
Posted:
Thu Jul 10, 2008 5:49 pm
by reubenpjacob
First, is there an option in Dynare that I can simulate the whole series of observed data based on the identified shock in the estimation. The purpose is to contrast the model generated data and the actual observations.
I AM NOT SURE...BUT I THINK THE ANSWER IS NO. YOU HAVE TO PROGRAM IT YOURSELF. JUST GET THE STATE SPACE MATRICES, I.E. THE T AND THE R MATRICES. IT SHOULD BE STRAIGHTFORWARD.
Second, it is about the smoothed shock figures popping out after estimation. What is the smoothing filter used in it ?
THE KALMAN SMOOTHER IS USED.
Third, when I use Bayesian Method embodied in Dynare sometime, some figures are spit out as the univariate diagnostics. It doesn't happen all the time. How to read the figures and is it a sign of bad fitting ?
THE DIAGNOSTICS WILL COME OUT ONLY IN THE CASE OF RUNNING MULTIPLE CHAINS. THE DIAGNOSTICS COMING OUT OF BOTH CHAINS WILL LOOK SIMILAR AFTER SOMETIME, IF THE TWO CHAINS CONVERGE TO THE SAME STATIONARY DISTRIBUTION.
REUBEN
Posted:
Fri Jul 11, 2008 7:55 am
by p.gelain
I agree with Reuben, but if you need what we usually call fitted values in order to compare them with the actual (observed) values you just need to take the filtered values that you can find stored in
oo_.FilteredVariables.VALIABLE_NAME
after the estimation. People usually use exactly those values to evaluate the fit of the model with the observed data (they call them one-side Kalman filter fitted data evaluated at the mean of the posterior). If you want to compare them in a plot or if you want to compute the correlation or whatever, pay attention that series in oo_.FilteredVariables has one observation more, i.e. tha first one, which is zero (the initial value for the kalman filter). Hence compare oo_.FilteredVariables.VALIABLE_NAME(2:end,:) with the whole VALIABLE_NAME series.
Paolo
Posted:
Fri Jul 11, 2008 8:02 am
by p.gelain
ok of course the "smiling face" is not voluntary. I wanted to write
oo_.FilteredVariables.VALIABLE_NAME(2:end,: )
Posted:
Thu Jul 24, 2008 3:24 am
by bigbigben
Thanks for the clarifying. The ghx matrix in oo_.dr is not the transition matrix of all the endogenous variables, instead, it is the transition of all endogenous variables on the "state variables" dynare picked. Where can I check what the "state variables" are ?
Posted:
Fri Jul 25, 2008 3:25 pm
by reubenpjacob
in dynare ,the transition matrix iis namedT and the contemp impact matrix is R. yo have to use the code available in dynare to find it. it does not automatically store it anywhere.
Posted:
Sun Jul 27, 2008 9:22 am
by OndraKamenik
simult_.m or simult.m will do the simulation job for you.
Ondra K.