Estimation Error

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 Error

Postby robpancr » Mon Oct 22, 2012 5:58 pm

Can anyone help with with this error I get while estimating a simple model?
I have tried to investigate quite a bit, but I really cannot get what the error message refers to:
Thanks in advance:


Here is the mod file:
------------------------------------------------------------
var dc, dd, v_c, v_d, x;
varexo e_c, e_x, e_d;

parameters DELTA THETA PSI MU_C MU_D RHO_X LAMBDA_DX;

DELTA=.99;
PSI=1.5;
THETA=(1-7.5)/(1-1/PSI);
MU_C=0.0015;
MU_D=0.0015;
RHO_X=.979;
LAMBDA_DX=3;


model;
v_c = DELTA^THETA * exp((-THETA/PSI)*dc(+1) + (THETA-1)*log((1+v_c(+1))*exp(dc(+1))/v_c) ) * (1+v_c(+1))*exp(dc(+1));
v_d = DELTA^THETA * exp((-THETA/PSI)*dc(+1) + (THETA-1)*log((1+v_c(+1))*exp(dc(+1))/v_c) ) * (1+v_d(+1))*exp(dd(+1));
dc = MU_C + x(-1) + e_c;
dd = MU_D + LAMBDA_DX*x(-1) + e_d;
x = RHO_X * x(-1) + e_x;
end;

initval;
v_c=15;
v_d=15;
dc=MU_C;
dd=MU_D;
x=0;
e_c=0;
e_x=0;
e_d=0;
end;

shocks;
var e_d; stderr .001;
var e_c; stderr .001;
var e_x; stderr .001;
end;

steady;

estimated_params;
DELTA, beta_pdf, 0.98,.005;
THETA,normal_pdf,-19.5, 0.0025;
PSI,normal_pdf,1.6, 0.1;
MU_C,normal_pdf,0.001, 0.001;
MU_D,normal_pdf,0.001, 0.001;
RHO_X,normal_pdf,.98, 0.005;
LAMBDA_DX,normal_pdf,3, 0.05;
stderr e_d,inv_gamma_pdf,.0025, 30;
stderr e_x,inv_gamma_pdf,.0003, 30;
stderr e_c,inv_gamma_pdf,.01, 30;
end;


varobs v_d dd dc;

estimation(datafile=simudata,mh_replic=1000,mh_jscale=.4,nodiagnostic);
------------------------------------------------------------
and here is the error:

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.1).
Starting preprocessing of the model file ...
Found 5 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.


STEADY-STATE RESULTS:

dc 0.0015
dd 0.0015
v_c 0
v_d 0
x 0

You did not declare endogenous variables after the estimation/calib_smoother command.
Error using inverse_gamma_specification (line 121)
inverse_gamma_specification:: Failed in solving for the hyperparameters!

Error in set_prior (line 213)
[bayestopt_.p6(k(i)),bayestopt_.p7(k(i))] = ...

Error in dynare_estimation_init (line 123)
[xparam1,estim_params_,bayestopt_,lb,ub,M_] =
set_prior(estim_params_,M_,options_);

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 AssetPricingEstimate (line 161)
dynare_estimation(var_list_);

Error in dynare (line 120)
evalin('base',fname) ;

>>
robpancr
 
Posts: 9
Joined: Mon Oct 15, 2012 8:44 am

Re: Estimation Error

Postby jpfeifer » Mon Oct 22, 2012 8:11 pm

The boldface part is not an error. Focus on the inverse gamma prior parts like
Code: Select all
stderr e_d,inv_gamma_pdf,.0025, 30;

Its support is from 0 until Infinity. It could be that a variance of 30 implies that the mean must be larger than 0.0025 as there is too much mass in the right tail. Try using a lower variance.
------------
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 help

Who is online

Users browsing this forum: No registered users and 6 guests