Page 1 of 1

non-linearized version of NK model

PostPosted: Sun May 11, 2014 10:41 pm
by rox17
Jesús Fernández-Villaverde (2006): "A Baseline DSGE Model"

why isn't the varobs command used ?

thank you.

Re: non-linearized version of NK model

PostPosted: Mon May 12, 2014 12:05 pm
by jpfeifer
Because the model is not estimated in the mod-file.

Re: non-linearized version of NK model

PostPosted: Mon May 12, 2014 9:02 pm
by rox17
I am trying to estimate a NK DSGE based on Justiniano and Preston (2010).
The steady state for all 7 variables is null. Can't figure out what is wrong - attached the .mod file.
I would appreciate very much if you'd give me a hand. Meanwhile, i search for initval to calibrate, maybe this is the problem.

Re: non-linearized version of NK model

PostPosted: Tue May 13, 2014 8:56 am
by jpfeifer
What is the supposed problem? The mod-file correctly solves and displays IRFs.

Re: non-linearized version of NK model

PostPosted: Tue May 13, 2014 10:50 am
by rox17
I need to find a steady state, don't I ? When I run it, ss values for my variables are zero. I don t think thats ok and I can t use it to simulate irf because all shocks will dissipate after some periods, so its irrelevant.

Re: non-linearized version of NK model

PostPosted: Tue May 13, 2014 10:58 am
by jpfeifer
I cannot follow. It looks as if you have entered a log-linearized model. The variables are then in percentage deviations from steady state. In steady state the percentage deviation is 0. Hence, you do not need to find a steady state for the variables.

Re: non-linearized version of NK model

PostPosted: Wed May 21, 2014 4:53 am
by rox17
Hello again. I've written the equations in exp() to see what values computes for ss.
running the steady command with solve algo4 :
STEADY: The problem most often occurs, because a variable with
STEADY: exponent smaller than 1 has been initialized to 0. Taking the derivative
STEADY: and evaluating it at the steady state then results in a division by 0.
No solution could be found.


going back to the log-l code, i have added
estimated_params;
phi, 2 ; niu, 0.6 ; sigma, 0.5 ;
stderr eps_g, 0.035449;
stderr eps_a, 0.008862;
corr eps_g, eps_a, 0;
end;

nothing shows in my output, just the eigen values.

i have read that
//dynare_sensitivity (identification=1, morris=2);
is a useful tool to observe which parameters are most likely to be less identifiable.should it be written in the code before estimated params ?

thank you so much for you support !
regards

Re: non-linearized version of NK model

PostPosted: Wed May 21, 2014 1:37 pm
by jpfeifer
Please post a mod-file

Re: non-linearized version of NK model

PostPosted: Thu May 22, 2014 9:21 am
by rox17
1. I've changed the greek letters (ex. sigma with sigm)
2. model is in linearized form, not log-linearized dev from ss
3. used steady with 4th algo solver
4. introduced the estimated_params block just to see what dynare computes - in my case, nothing.
5. optional - dynare sensitivity and stoch_simul.

How do I write the syntax for stoch_simul to have the interval of variation(or cluster) on graphs ? on the plot is only the impulse response.
also, i would like to obtain the likelihood of the model.

thank you for you time.

Re: non-linearized version of NK model

PostPosted: Mon May 26, 2014 2:39 pm
by jpfeifer
See http://www.dynare.org/phpBB3/viewtopic.php?f=1&t=5679
stoch_simul uses a calibrated model. There is no uncertainty for the IRFs. Hence, there are no confidence bands. Only if you run estimation you can get confidence bands and the likelihood.

Re: non-linearized version of NK model

PostPosted: Tue May 27, 2014 8:15 am
by rox17
So if i use estimation command before stoch_sim, the parameters estimated by the algorithm i choose in estimation's syntax will be used in computing irf s ?
excepting the ones calibrated in the preamble and not mentioned in the estimated_params block.

Re: non-linearized version of NK model

PostPosted: Tue May 27, 2014 12:58 pm
by jpfeifer
Yes. See the manual for details.
After running estimation, the parameters M_.params and the variance matrix M_.Sigma_e of
the shocks are set to the mode for maximum likelihood estimation or posterior mode computation
without Metropolis iterations.
After estimation with Metropolis iterations (option mh_replic > 0 or option load_mh_file
set) the parameters M_.params and the variance matrix M_.Sigma_e of the shocks are set to the
posterior mean.