Page 1 of 1

Log data density [Laplace approximation] is NaN.

PostPosted: Fri Jul 29, 2016 3:19 am
by xusherry
Dear all:
when i use bayesian esimation method to estimate some parameters using quartly data, and i get errors following that:
Log data density [Laplace approximation] is NaN.

错误使用 chol
矩阵必须为正定矩阵。

出错 metropolis_hastings_initialization (line 68)
d = chol(vv);

出错 random_walk_metropolis_hastings (line 62)
[ ix2, ilogpo2, ModelName, MetropolisFolder, fblck, fline, npar, nblck,
nruns, NewFile, MAX_nruns, d ] = ...

出错 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_);

出错 dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

出错 mypaper (line 650)
dynare_estimation(var_list_);

出错 dynare (line 180)
evalin('base',fname) ;

I don't know how to solve, what is the problem?
I wonder whether is the data problem, and the procedure i handle the data following that:(1)seasonal adjustment to get the trending and cyclic data;(2) then use the logarithmic form for the data;(3) use hp filtering to get the cyclic data, is the procedure right?
And the last question is how to judge the bayesian estimation results or how to judge the model is good or bad?
Hope for your help, thank you!!

Re: Log data density [Laplace approximation] is NaN.

PostPosted: Mon Aug 01, 2016 7:09 am
by jpfeifer
1. You are still not supposed to use an HP-filter for model estimation via ML/Bayesian techniques. 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

2. The mode_check plots clearly show you the problem. The estimate for alpha_gc is at the boundary of the parameter range allowed by the prior. No interior maximum has been attained. You might want to try a more informative prior.