Bayesian Estimation has issues with the posterior covariance

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.

Bayesian Estimation has issues with the posterior covariance

Postby marshi100 » Thu Mar 17, 2016 5:38 am

I'm trying to perform a Bayesian estimation of an open economy DSGE model following Justiniano and Preston (2010). I'm estimating the model for a small open economy using observable data on output, CPI inflation, domestic inflation, interest rate, exchange rate, terms of trade, foreign output, foreign interest rate, foreign inflation. All original variable were logged and then detrended using a linear trend (in MATLAB). The model is written in log-linear form following the original paper. The priors very closely follow the original paper.

When I try to estimate the model I receive the following error message:

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.

and also:

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 62)
[ ix2, ilogpo2, ModelName, MetropolisFolder, fblck, fline,
npar, nblck, nruns, NewFile, MAX_nruns, d ] = ...

Error in dynare_estimation_1 (line 782)
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 89)
dynare_estimation_1(var_list,dname);

Error in HW2_test_3 (line 331)
dynare_estimation(var_list_);

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


I tried to use an estimated_params_init block using posterior values found in the paper (but for a different country), but this doesn't solve the problem. Any help is much appreciated.
Attachments
data.zip
(5.35 KiB) Downloaded 91 times
HW2.mod
(5.72 KiB) Downloaded 100 times
marshi100
 
Posts: 1
Joined: Thu Mar 17, 2016 5:25 am

Re: Bayesian Estimation has issues with the posterior covari

Postby jpfeifer » Fri Mar 18, 2016 8:41 am

I am pretty sure your observation equations are wrong. pih goes up to 8, which suggests it is a net rate multiplied by 100. In the model, this would be 0.08. Thus, there seems to be an unaccounted for scaling by 100. Looking at y you also did not conduct a seasonal adjustment as there is clearly a seasonal pattern.
------------
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 14 guests