Dynare 4.5, new command 'generate_trace_plots`

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.

Dynare 4.5, new command 'generate_trace_plots`

Postby phuong.macro » Thu Jul 13, 2017 9:30 am

Hi everyone

I try to estimate my model with the lastest version of Dynare 4.5. In particular, I would use a new Dynare command 'generate_trace_plots` to generate all trace
plots for one chain. Unfortunately, Dynare 4.5 does not work. The error is as following

'ERROR: ALEstim_phuong.mod: line 836, cols 1-20: syntax error, unexpected NAME, expecting COMMA or ')'

Error using dynare (line 217)
DYNARE: preprocessing failed
Error in Main (line 2)'

I have a look at the line 836, but there is no sytax error. Then I come back to use the Dynare version 4.4.3, it works well after removing the command 'generate_trace_plots` out of the estimation block

My question is how I can run dynare 4.5 with new command 'generate_trace_plots` in the estimatioin block
Attachments
P_files.rar
(42.45 KiB) Downloaded 64 times
phuong.macro
 
Posts: 28
Joined: Mon Jun 27, 2016 7:35 pm

Re: Dynare 4.5, new command 'generate_trace_plots`

Postby StephaneAdjemian » Thu Jul 13, 2017 9:46 am

Dear Phuong,

This is not an option of the estimation command, but a matlab function (see the reference manual). So you need to remove it from the list of options, and add something like

Code: Select all
generate_trace_plots(1);


after the estimation command.

Also you have to use the nostrict dynare command line option because some of the declared shocks are not used in the model.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Dynare 4.5, new command 'generate_trace_plots`

Postby phuong.macro » Thu Jul 13, 2017 10:16 am

Dear Stephane

Thank you so much for your suggesion

Based on that, I modified my Mod file as following

Code: Select all
estimation(
datafile=Trans_Aus_Dat_dynare,
//presample=25,
mode_compute=0,%4: Version of Christopher Sim's optimizer csminwel
//optim = ('MaxIter',100000,'MaxFunEvals',100000),
mh_replic=2000,
//load_mh_file, % to use the previuos MH result
mode_file=ALEstim_phuong_mode, % to use the previous likelihood result
filtered_vars
//filter_step_ahead=[1 2 1]
//trace_plot, %plot the posterior density,


//mode_check
//lik_init=1,     
//nograph=0
);
generate_trace_plots(1);//generating all traceplots for one chain
nostrict;


But Dynare still report

''ERROR: eps_nuhat eps_zetaqhat eps_taukhat eps_tauyhat eps_tauchat eps_tauwhat eps_ghat eps_muhat not used in model block. To bypass this error, use the `nostrict` option. This may lead to crashes or unexpected behavior.

Error using dynare (line 217)
DYNARE: preprocessing failed
Error in Main (line 2)
dynare ALEstim_phuong ''
phuong.macro
 
Posts: 28
Joined: Mon Jun 27, 2016 7:35 pm

Re: Dynare 4.5, new command 'generate_trace_plots`

Postby StephaneAdjemian » Thu Jul 13, 2017 10:26 am

This is precisely why you need to pass the nostrict option to the dynare command (I thought the error message was clear enough). You have to call dynare as follows:

Code: Select all
dynare ALEstim_phuong nostrict


This is new a new feature in 4.5.x, Dynare complains if you declare exogenous variables that are not used in the model.

Best,
Stéphane.
Stéphane Adjemian
Université du Maine, GAINS and DynareTeam
https://stepan.adjemian.eu
StephaneAdjemian
 
Posts: 429
Joined: Wed Jan 05, 2005 4:24 pm
Location: Paris, France.

Re: Dynare 4.5, new command 'generate_trace_plots`

Postby phuong.macro » Thu Jul 13, 2017 1:38 pm

Dear Stephane

I got it. Last time, I confused how to declare ''notrict'' when running Dynare 4.5

Thank you alot for your detail explanation
phuong.macro
 
Posts: 28
Joined: Mon Jun 27, 2016 7:35 pm


Return to Dynare help

Who is online

Users browsing this forum: No registered users and 11 guests