Parameter estimation

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.

Parameter estimation

Postby rox17 » Sat May 24, 2014 10:42 am

Hy,

I experience some errors in my estimation (attached the code and data if anyone would like to take a look) :

78.3% of the prior support gives unique saddle-path solution.
0.0% of the prior support gives explosive dynamics.
21.6% of the prior support gives indeterminacy.
Smirnov statistics in driving acceptable behaviour
psi_pi d-stat = 0.524 p-value = 0.000
psi_pis d-stat = 0.524 p-value = 0.000

Smirnov statistics in driving indeterminacy
psi_pi d-stat = 0.410 p-value = 0.000
psi_pis d-stat = 0.410 p-value = 0.000


Starting bivariate analysis:

Correlation analysis for prior_stable
[tetas,psi_y]: corrcoef = -0.097

Correlation analysis for prior_unacceptable
[teta_f,rho_gs]: corrcoef = 0.188
[fi,rhos]: corrcoef = 0.153
[h,rho_cp]: corrcoef = 0.167
[psi_pi,psi_pis]: corrcoef = -0.591
[tetas,psi_y]: corrcoef = 0.357

Correlation analysis for prior_indeterm
[teta_f,rho_gs]: corrcoef = 0.188
[fi,rhos]: corrcoef = 0.153
[h,rho_cp]: corrcoef = 0.167
[psi_pi,psi_pis]: corrcoef = -0.591
[tetas,psi_y]: corrcoef = 0.357
Computing theoretical moments ...
Undefined function 'Sigma_e_' for input arguments of type 'double'.
Attachments
NK.rar
(248.61 KiB) Downloaded 51 times
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby rox17 » Sat May 24, 2014 1:10 pm

Can anyone give an answer ?
Thanks.
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby rox17 » Sat May 24, 2014 4:40 pm

I managed to obtain

All parameter values in the specified ranges give unique saddle-path solution!

but there's something wrong although,

Computing theoretical moments ...
Undefined function 'Sigma_e_' for input arguments of type 'double'.

Error in set_shocks_param (line 42)
Sigma_e(k1,k2) = xparam1(i+offset)*sqrt(Sigma_e_(k1,k1)*Sigma_e_(k2,k2));

Error in mc_moments (line 34)
set_shocks_param(ss(j,:));

Error in map_ident_ (line 58)
[vdec, cc, ac] = mc_moments(T, lpmatx, oo_.dr);

Error in dynare_sensitivity (line 239)
map_ident_(OutputDirectoryName,options_gsa);

Error in cod_original (line 323)
dynare_sensitivity(options_gsa);

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

When i use "identification" command :

Testing ML Starting value
Error using .*
Matrix dimensions must agree.

f1 f1 :)
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby jpfeifer » Mon May 26, 2014 1:03 pm

That is a bug. We will look into it and keep you posted.
------------
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: Parameter estimation

Postby rox17 » Tue May 27, 2014 12:00 pm

how can i test gelman brooks convergence ?
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

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

By running two MCMC chains with at least 2000 observations, i.e.
Code: Select all
estimation(...,mh_nblocks=2,mh_replic=10000)
------------
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: Parameter estimation

Postby rox17 » Tue May 27, 2014 3:42 pm

initial value of the log posterior : -121.3284

POSTERIOR KERNEL OPTIMIZATION PROBLEM!
(minus) the hessian matrix at the "mode" is not positive definite!
=> posterior variance of the estimated parameters are not positive.
You should try to change the initial values of the parameters using
the estimated_params_init block, or use another optimization routine.
Warning: The results below are most likely wrong!
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby jpfeifer » Wed May 28, 2014 7:46 am

Search the forum for that one. At least 5 percent of the posts used to deal with this.
------------
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: Parameter estimation

Postby rox17 » Thu May 29, 2014 3:55 am

After estimation, 4 of my shocks have 0 std err and t statistic. only one has 0.9879 1.0512 . most constants provide the same pair of values for (std err, t stat) :0 .
also, the smooth shocks graph looks like a white noise for 2 of them .
this is definitely a bad estimation, but i don t understand what is the cause: constants or missmatch between the data/variab ?
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby jpfeifer » Thu May 29, 2014 1:25 pm

Please post the most recent version.
------------
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: Parameter estimation

Postby rox17 » Sun Jun 01, 2014 8:26 pm

attached.
Attachments
BUN.mod
(3.73 KiB) Downloaded 64 times
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby jpfeifer » Mon Jun 02, 2014 5:06 am

The data file is also required.
------------
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: Parameter estimation

Postby rox17 » Mon Jun 02, 2014 5:08 pm

Attached an archive with code & data file.

If the mle analysis is performed, although dynare notifies me that the estimation is most likely wrong due to the negative hessian, why aren't confidence intervals computed ?
what else can i use to test the strength of the model ?
i'm also not sure what algorhytm to select in the "estimation"function if i don't perform bayesian estim. so far i have used only 4 and 6.

y corresponds to the o.g. (log deviation of the trend from gdp)
i - interest rate ( diff(1) to obtain a stationary distrib)
pi - inflation rate, obtained as log diff of price index
s - real exchange rate (log diff for the same reason - stationarity) .

i tried to estimate parameters without the shocks block in order to identify the param that have issues.
the identification strength & the sensivity component with moments inf matrix plots show only blue columns (relative to param value) ; relative to prior std which should have been plotted with red are smaller than the blue ones and they don t overlap or... ?

thank you very much professor.
Attachments
Test.rar
(14.06 KiB) Downloaded 65 times
rox17
 
Posts: 22
Joined: Sat May 10, 2014 9:44 am

Re: Parameter estimation

Postby jpfeifer » Fri Jun 06, 2014 5:32 pm

A lot of things:
1. All parameters are identified. That is not the source of your problems. The observation equations are. See below. That something is severely wrong can be seen in the fact that many parameters like psi_y or nui are at their upper bounds at the mode. That always results in a non-positive definite Hessian as you did not find an interior maximum.
2. Without Bayesian estimation and a specified prior, identification cannot display identification strenght relative to the prior mean.
3. Confidence intervals for what? You get mean and standard deviation for the parameter. CI for the parameters directly follow. For IRFs, you need to add the bayesian_irf-option
4. Finding the mode to your model is hard. Use mode_compute=6,9 or 10.
5. Your observation equations are wrong. The way you do it currently, e.g. pi has mean 0 in the model, but is not demeaned in the data. Similarly, the interest rate in the model is not in first differences, but your data is. You cannot say they are equal. You need to fix that. See Pfeifer(2013): "A Guide to Specifying Observation Equations for the Estimation of DSGE Models" https://sites.google.com/site/pfeiferecon/Pfeifer_2013_Observation_Equations.pdf for details.
------------
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 5 guests