I have a basic four equation linearized New Keynesian model. There is an IS equation, Phillips Curve, nominal interest rate rule and a stochastic process for the natural rate of output. I want to estimate the price stickiness parameter and the coefficients on my policy rule. I have two shocks: one on the nominal rate and another on the natural rate of output. I take real GDP as my observed variable. I construct the series as follows:
1) Take the log of real GDP
2) Remove a time trend from real GDP and save the residuals.
3) Put the residuals in for my observed variable.
My reasoning is that the model is already linearized around the steady state, so my data should have mean zero. However, when I estimate the model with MLE I get the 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.
Warning: The results below are most likely wrong!
> In dynare_estimation_1 at 643
In dynare_estimation at 62
In nk_tr_est at 120
In dynare at 132
RESULTS FROM MAXIMUM LIKELIHOOD
parameters
Estimate s.d. t-stat
phi 0.0000 0.0000 0.0000
thetapi 1.3512 2928.5148 0.0005
thetay 0.9806 3733.2070 0.0003
rho 0.9900 0.0091 108.4244
standard deviation of shocks
Estimate s.d. t-stat
e 0.0099 0.0004 22.7696
u 0.0092 0.0000 0.0000
Clearly, something is wrong. Is there a problem with my code or data? I've included both my .mod file and data file. Thank you for your insight!