non-linearized version of NK model

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.

non-linearized version of NK model

Postby rox17 » Sun May 11, 2014 10:41 pm

Jesús Fernández-Villaverde (2006): "A Baseline DSGE Model"

why isn't the varobs command used ?

thank you.
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: non-linearized version of NK model

Postby jpfeifer » Mon May 12, 2014 12:05 pm

Because the model is not estimated in the mod-file.
------------
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: non-linearized version of NK model

Postby rox17 » Mon May 12, 2014 9:02 pm

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.
Attachments
cod.mod
(3.18 KiB) Downloaded 222 times
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: non-linearized version of NK model

Postby jpfeifer » Tue May 13, 2014 8:56 am

What is the supposed problem? The mod-file correctly solves and displays IRFs.
------------
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: non-linearized version of NK model

Postby rox17 » Tue May 13, 2014 10:50 am

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.
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: non-linearized version of NK model

Postby jpfeifer » Tue May 13, 2014 10:58 am

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.
------------
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: non-linearized version of NK model

Postby rox17 » Wed May 21, 2014 4:53 am

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
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: non-linearized version of NK model

Postby jpfeifer » Wed May 21, 2014 1:37 pm

Please post a mod-file
------------
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: non-linearized version of NK model

Postby rox17 » Thu May 22, 2014 9:21 am

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.
Attachments
estimare.mod
(3.42 KiB) Downloaded 179 times
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: non-linearized version of NK model

Postby jpfeifer » Mon May 26, 2014 2:39 pm

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.
------------
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: non-linearized version of NK model

Postby rox17 » Tue May 27, 2014 8:15 am

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.
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: non-linearized version of NK model

Postby jpfeifer » Tue May 27, 2014 12:58 pm

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.
------------
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 contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests