I am in trouble with recursive forecasting routine. It will be a bit lengthy but I need to set things out such that my question is, hopefully, clear.
I am estimating a version of SW07 for an european country’.
I have 90 observations (actually, I have 93, but since first_obs=4 they end up being just 90) available and I am estimating recursively my model from period 45 onward (i.e. ‘‘nobs[45:90]’’ to obtain recursive forecasts.
Since the recursive forecasting procedure is very time consuming, before launching it, I always make sure the estimation procedure does not get stuck at any of the sample points. That is, I just run the code recursively by hands for nobs[45:90], [46:90]…[90:90], just to check whether the M-H initialization is fine (I stop it when I see it is fine and go further). This strategy has always been working.
The point is that now a strange thing happens. When the fully automated recursive estimation procedure is launched in dynare, the model recursive estimation is fine until period 88, where it gets stuck as the MH initialization gives the following error message :
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 63)
** metropolis_hastings_initialization(TargetFun, xparam1, vv, mh_bounds,dataset_,options_,M_,estim_params_,bayestopt_,oo_);**
Error in dynare_estimation_1 (line 782)
Error in dynare_estimation (line 77)
Error in fbc_es_forecasting_noredr_consCY (line 957)
Error in dynare (line 181)
However, if I try to rerun it for nobs[88:90] it works fine. That is pretty strange.
The point is that, why? If I let the routine start automatically from nobs[88:90] it works, if I let it start from nobs[45:90] it stops at 88 (that is the one corresponding to nobs[88:90]).
I am a bit puzzled, does anybody have a clue on why this happens? Am I missing something?
Thank you in advance,