Bayesian estimation - data/measurement equation problem

Hello,

I am having problem estimating the Gertler - Karadi (2011) model of uncoventional monetary policy.

I have read (hopefully) all threads on this forum regarding this issue, however, I am still struggling to produce decent results.
From the things I tried - at first, I followed approach of SW, defining measurement equations in the form of y_obs = y - y(-1)trying to include constant term in the form of (estimated) measurement error or trend growth rate. Dataset used in the estimation was log differenced. Neither of this worked, all ending with dynare and mode_compute=4 unable to find mode and well known error Error using chol Matrix must be positive definite.
I have also tried to pass the data through the HP filter to get rid of trend (then removing measurement equations and having observables defined only as y, c etc.) - this didn’t work as well.
The only method that worked and with which dynare was able to find mode and subsequently run Metropolis-Hastings was to have the data log differenced and have measurement equations including measurement error y_obs = y - y(-1) + me_y which was defined in the shocks section as var me_y; stderr 1; This produced results, however, the historical shock decomposition of observable variables was useless, since the only thing I saw on the graphs was the whole area explained by measurement error…
I also tried to multiply the observable data by the factor of 100 as in SW, but reading their code I was not so sure how should I update the rest of my .mod file, mainly the steady state values to get this working…
Same goes with values for prior distributions, I tried many many different values.

I attached the .mod file (available also at macromodels database) as well as the data, with the version including measurement equations, without me errors defined. Data are log differenced, taken from FRED database and include real GDP growth (levels), consumption, net investment, bank net worth and inflation (calculated as log differenced CPI)

I would be thankful for any help
data_new.xls (49 KB)
model_est.mod (4.5 KB)

Try to find a better mode of the posterior before you start the MCMC. The problem, I think is with the estimate of the Hessian at the mode. Try mode_compute= 7 or 8 or a combination. A reasonably well conditioned Hessian will solve most of your problems.

I was thinking about trying different mode_compute, but isn’t the problem more related to reshaping the data or defining correctly measurement equations? Why is that with fixed measurement errors to 1 the estimation runs even with mode_compute=4?

Because then the model plays almost no role in explaining the observables. The measurement error does. Any deficiencies of the model are then glossed over.
Please provide explicit starting values for your parameters as a first step to improvement (instead of starting at the prior mean)

I have the following problem with a GK replication:

Error using dynare_estimation_init (line 277)
Estimation: the ‘estimated_params’ block is mandatory (unless you are running a
smoother)

Error in dynare_estimation_1 (line 81)
[dataset_,xparam1, hh, M_, options_, oo_, estim_params_,bayestopt_] =
dynare_estimation_init(var_list_, dname, ], M_, options_, oo_, estim_params_,
bayestopt_);

Error in dynare_estimation (line 89)
dynare_estimation_1(var_list,dname);

Error in aaa (line 434)
dynare_estimation(var_list_);

Error in dynare (line 180)
evalin(‘base’,fname) ;
aaa.mod (6.16 KB)

Hi,

I’m absolutely not an expert, neither in dynare nor bayesian estimation, but you did not declare priors.
That is what dynare tells you: the ‘estimated_params’ block is mandatory

Hope this can help a little.

rudy

Also, it seems that you have more observables than shock and, if I am not mistaken, this will lead to stochastic singularity: you must have at least as much shocks as observables.

Rudy