Error in estimation using dynare 4.2.0

Dear all.

I am facing a problem in solving Open Eocnomy New Keyesian DSGE model.
While I tried to solve the model, dynare gave me back the following message.

This version of Dynare cannot estimate non linearized models!
Set “order” equal to 1.

??? Reference to non-existent field ‘y’.

Error in ==> read_variables at 63
dyn_tmp_01 = s.(deblank(var_names_01(dyn_i_01,:)));

Error in ==> dynare_estimation_1 at 269
rawdata = read_variables(options_.datafile,options_.varobs,],options_.xls_sheet,options_.xls_range);

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> newzealand at 254
dynare_estimation(var_list_);

Please give me a hint about the source of my trouble. Here attached is the mod file and the data file.
Thanks in advance!!
newzealand.xls (24.5 KB)
newzealand.mod (2.67 KB)

Hi,
you can solve models in higher order, i.e. use

but you cannot estimate them in higher order, i.e.

Thank you for answering.

I tried to correct the problem as you told me (stoch_simul(order=2)),
but another problem is occured.

??? Error using ==> chol
Matrix must be positive definite.

Error in ==> metropolis_hastings_initialization at 52
d = chol(vv);

Error in ==> random_walk_metropolis_hastings at 58
ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = …

Error in ==> dynare_estimation_1 at 1106
feval(options_.posterior_sampling_method,‘DsgeLikelihood’,options_.proposal_distribution,xparam1,invhess,bounds,gend,data,…

Error in ==> dynare_estimation at 62
dynare_estimation_1(var_list,varargin{:});

Error in ==> newzealand at 254
dynare_estimation(var_list_);

Error in ==> dynare at 132
evalin(‘base’,fname) ;

What can I do at this time? I attach the .mod file. Is it wrong?
Help me please
newzealand.mod (2.67 KB)

Hi,

It works fine using Octave 3.2.4 and Dynare 4.1.3. Attached the files I used. Please note that I made few changes. I changed ‘pi’ to ‘pie’, decrease mh_replic from 20000 to 2000. I also use simulated data because when I used your data set it produced error saying that “the data are perfectly correlated”.

I used order=2 for simulation and order=1 for estimation.

The following are the posterior maximization and estimation results.

artificialnz.m (564 KB)
newzealand.mod (2.74 KB)

Thank you for answering!!

But I have another question about your answer. ( I’m new in dynare. :cry: )
What’s the meaning of the ‘simulated data’ ? Can I make this ? How?
And, when I want to estimate DSGE model in particular area(ex. Newzealand, South korea etc), can I use simulated data?
( I guess that simulated data is different from actual data, so I may not use simulated data )

Plus, I tried to play the simulated data and mod file as you attached it.
But dynare gives warnings like below.

Warning: File ‘nz/Output’ not found.

In CheckPath at 42
In dynare_estimation_1 at 901
In dynare_estimation at 62
In nz at 257
In dynare at 132
Warning: File ‘nz/metropolis’ not found.
In CheckPath at 42
In metropolis_hastings_initialization at 46
In random_walk_metropolis_hastings at 58
In dynare_estimation_1 at 1106
In dynare_estimation at 62
In nz at 257
In dynare at 132

What’s the meaning? Can I ignore that?

Thanks a lot!!

Hi,

In fact I am also new in Dynare. :smiley:
Simulated data comes from simulation (stoch_simul) command. Of course it is not real data. You can produce simulated data by putting

after stoch_simul command. It will create simulated data named artificialnz.m. Of course you have to use real data if you want to estimate “real” parameters.

I am not sure about the warning messages. Maybe others can answer it. My apologize.

RZ

You can ignore the warnings. They just say that the respective folder does not exist yet on the harddrive and will now be created.

Thanks a lot !!
I received much help!! :smiley: