Identification analysis problem

We are doing Bayesian estimation using Matlab R2019b and Dynare 4.6.1 versions. We use ‘identification’ command before ‘estimation’ command and get the error message. We also tried the command ‘identification(order=1)’, but it didn’t solve the issue. Why may that appear?

The error message is below. Thanks for your help!

Testing prior mean
Error using get_perturbation_params_derivs (line 531)
For analytical parameter derivatives ‘dynamic_params_derivs.m’ file is needed, this can be created by putting identification(order=1) into your mod file.
Error in get_identification_jacobians (line 153)
oo.dr.derivs = get_perturbation_params_derivs(M, options, estim_params, oo, indpmodel, indpstderr, indpcorr, d2flag);
Error in identification_analysis (line 140)
[MEAN, dMEAN, REDUCEDFORM, dREDUCEDFORM, DYNAMIC, dDYNAMIC, MOMENTS, dMOMENTS, dSPECTRUM, dSPECTRUM_NO_MEAN, dMINIMAL, derivatives_info] = get_identification_jacobians(estim_params_, M_, oo_, options_, options_ident, indpmodel, indpstderr, indpcorr, indvobs);
Error in dynare_identification (line 461)
identification_analysis(params, indpmodel, indpstderr, indpcorr, options_ident, dataset_info, prior_exist, 1); %the 1 at the end implies initialization of persistent variables
Error in code_all.driver (line 3398)
Error in dynare (line 293)
evalin(‘base’,[fname ‘.driver’]) ;
Error in run_all (line 435)
dynare code_all.mod

Could you please provide me with the files to replicate the issue

I put in this error message in case some files are not created by the preprocessor, so I’d be interested what triggered this for you. Are you using bytecode or usedll in your model block, as I did not really test this? Or are you running dynare yourmodfile params_derivs_order=0? Anyways, please sent us the files and we’ll look into this. As a workaround you can also of course use numerical derivatives, see the analytic_derivation_mode option.