Estimation of User Guide example 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.

Estimation of User Guide example model

Postby ger163609 » Fri May 17, 2013 12:06 pm

Hello!
I just tried to estimate the RBC model from the Dynare user guide. For some reason it doesn't work but I can't figure out where the bug lies. If someone of you could help me out, I would appreciate it a lot! :-)

Always I try to run the model the following error message shows up:

>> dynare RBC_est

Configuring Dynare ...
[mex] Generalized QZ.
[mex] Sylvester equation solution.
[mex] Kronecker products.
[mex] Sparse kronecker products.
[mex] Local state space iteration (second order).
[mex] Bytecode evaluation.
[mex] k-order perturbation solver.
[mex] k-order solution simulation.
[mex] Quasi Monte-Carlo sequence (Sobol).
[mex] Markov Switching SBVAR.

Starting Dynare (version 4.3.2).
Starting preprocessing of the model file ...
Found 9 equation(s).
Evaluating expressions...done
Computing static model derivatives:
- order 1
Computing dynamic model derivatives:
- order 1
- order 2
Processing outputs ...done
Preprocessing completed.
Starting MATLAB/Octave computing.


You did not declare endogenous variables after the estimation/calib_smoother command.
Subscripted assignment dimension mismatch.
Error in read_variables (line 98)
dyn_data_01(:,dyn_i_01) = dyn_tmp_01;
Error in initialize_dataset (line 32)
rawdata = read_variables(datafile,varobs,[],xls.sheet,xls.range);
Error in dynare_estimation_init (line 347)
dataset_ =
initialize_dataset(options_.datafile,options_.varobs,options_.first_obs,options_.nobs,transformation,options_.prefilter,xls);
Error in dynare_estimation_1 (line 59)
[dataset_,xparam1, M_, options_, oo_, estim_params_,bayestopt_] = dynare_estimation_init(var_list_, dname,
[], M_, options_, oo_, estim_params_, bayestopt_);
Error in dynare_estimation (line 70)
dynare_estimation_1(var_list,dname);
Error in RBC_est (line 141)
dynare_estimation(var_list_);
Error in dynare (line 120)
evalin('base',fname) ;

Does it have to do with the version of Dynare? I have tried several versions, but the problem is still there.

It would be great if anyone out there could give me a hint :-)
Attachments
simuldataNKM.xls
Excel sheet with GDP data
(27 KiB) Downloaded 438 times
RBC_Est.mod
Mod-File from User guide example
(799 Bytes) Downloaded 408 times
ger163609
 
Posts: 21
Joined: Tue Nov 20, 2012 7:30 pm

Re: Estimation of User Guide example model

Postby jpfeifer » Fri May 17, 2013 6:16 pm

1. Your Excel-file seems broken.
2. The file contains 120 observations, but you tell Dynare to load 500 observations and drop 200. That won't work.

I attached a running version.
Attachments
RBC_Est.zip
Data and mod-file
(7.51 KiB) Downloaded 459 times
------------
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: Estimation of User Guide example model

Postby ger163609 » Tue May 21, 2013 1:42 pm

Hey!
Thanks a lot for your help, I appreciate it a lot! I am sorry for replying that late but I've been offline the last days.

The datafile actually seemed to be broken anyhow. Now Dynare accepts it and is able to run the MCMC simulations; Though, the posteriors are only displayed as tables and not as graphs. Additionaly, some errors show up which are plugged in below. Do you have the same problem in your simulation? Thank you again for your contributions!


RESULTS FROM POSTERIOR MAXIMIZATION
parameters
prior mean mode s.d. t-stat prior pstdev

alpha 0.350 0.3688 0.0033 112.3748 beta 0.0200
beta 0.990 0.9977 0.0000 116309.3425 beta 0.0020
delta 0.025 0.0103 0.0000 2198.6316 beta 0.0030
psi 1.750 1.7488 0.0768 22.7649 gamm 0.0200
rho 0.950 0.9907 0.0001 9572.5167 beta 0.0500
epsilon 10.000 10.0000 0.0000 0.0000 gamm 0.0030
standard deviation of shocks
prior mean mode s.d. t-stat prior pstdev

e 0.010 0.0616 0.0009 66.3104 invg Inf

Log data density [Laplace approximation] is -6219.117963.

Warning: File 'RBC_est/metropolis' not found.
> In CheckPath at 41
In metropolis_hastings_initialization at 62
In random_walk_metropolis_hastings at 69
In dynare_estimation_1 at 909
In dynare_estimation at 70
In RBC_est at 139
In dynare at 120
Error using chol
Matrix must be positive definite.
Error in metropolis_hastings_initialization (line 68)
d = chol(vv);
Error in random_walk_metropolis_hastings (line 69)
[ ix2, ilogpo2, ModelName, MhDirectoryName, fblck, fline, npar, nblck, nruns, NewFile, MAX_nruns, d ] = ...
Error in dynare_estimation_1 (line 909)
feval(options_.posterior_sampling_method,objective_function,options_.proposal_distribution,xparam1,invhess,bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);
Error in dynare_estimation (line 70)
dynare_estimation_1(var_list,dname);
Error in RBC_est (line 139)
dynare_estimation(var_list_);
Error in dynare (line 120)
evalin('base',fname) ;
ger163609
 
Posts: 21
Joined: Tue Nov 20, 2012 7:30 pm

Re: Estimation of User Guide example model

Postby eta » Mon Aug 24, 2015 10:12 am

Hi, what's wrong with the files attached (Rbc_Est.zip) ? I have also tried the unstable version. Is there another running version ? Thanks
Attachments
RBC_Est.mod
(775 Bytes) Downloaded 245 times
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Estimation of User Guide example model

Postby jpfeifer » Mon Aug 31, 2015 8:44 am

What is the problem you face?
------------
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: Estimation of User Guide example model

Postby eta » Thu Sep 03, 2015 8:52 am

The same errors mentioned by ger163609 in his last post.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Estimation of User Guide example model

Postby jpfeifer » Fri Sep 04, 2015 6:52 am

Sorry, but that mod-file does not work. Apparently, it has been broken from the start. You cannot estimate all those parameters when only observing output. Some of the parameters are not identified. Why do you need this 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: Estimation of User Guide example model

Postby eta » Sun Sep 06, 2015 9:25 am

I was just looking for a simple example of estimation. Thanks.
eta
 
Posts: 70
Joined: Sat Sep 27, 2014 3:48 pm

Re: Estimation of User Guide example model

Postby mianzhui » Wed Nov 25, 2015 12:51 am

jpfeifer wrote:Sorry, but that mod-file does not work. Apparently, it has been broken from the start. You cannot estimate all those parameters when only observing output. Some of the parameters are not identified. Why do you need this file?


any of you guys have a running version of simple model?
mianzhui
 
Posts: 5
Joined: Tue Nov 24, 2015 8:49 pm


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests