I have formulated a dsge model using particle filter estimation with order=2, however, when i run it with kalman filter with order=1, it is able to run, however, when i use order=2, the following error occurs:
The rank condition is verified.
You did not declare endogenous variables after the estimation/calib_smoother command.
Estimation using a non linear filter!
ESTIMATION_CHECKS: There was an error in computing the likelihood for initial parameter values.
ESTIMATION_CHECKS: You should try using the calibrated version of the model as starting values. To do
ESTIMATION_CHECKS: this, add an empty estimated_params_init-block with use_calibration option immediately before the estimation
ESTIMATION_CHECKS: command (and after the estimated_params-block so that it does not get overwritten):
Error using chol
Matrix must be positive definite.
Error in sequential_importance_particle_filter (line 74)
StateVectorVarianceSquareRoot = chol(ReducedForm.StateVectorVariance)’;%reduced_rank_cholesky(ReducedForm.StateVectorVariance)’;
Error in non_linear_dsge_likelihood (line 313)
LIK = feval(DynareOptions.particle.algorithm,ReducedForm,Y,start,DynareOptions.particle,DynareOptions.threads);
Error in initial_estimation_checks (line 133)
[fval,junk1,junk2,a,b,c,d] = feval(objective_function,xparam1,DynareDataset,DatasetInfo,DynareOptions,Model,EstimatedParameters,BayesInfo,BoundsInfo,DynareResults);
Error in dynare_estimation_1 (line 157)
oo_ = initial_estimation_checks(objective_function,xparam1,dataset_,dataset_info,M_,estim_params_,options_,bayestopt_,bounds,oo_);
Error in dynare_estimation (line 105)
Error in ThesisNewCode (line 893)
Error in dynare (line 223)
when i run model_diagnostics(M_,options_,oo_)
the following errors appears:
MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 9 colinear relationships between the variables and the equations
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.
I am wondering anyone could kindly give me some indication about this? Thank you very much. My thesis is about comparing the forecasting performance of kalman filter and particle filter and I need to find a way to run the model using particle filter since my phd thesis submission deadline is approaching. Thank you very much!
The first attachment is the data, the second attachment is my mod file. any suggestions will be helpful! thank you again
ThesisNewCode.mod (31.5 KB)
australia_us_data206.zip (7.25 KB)