Reference to non-existent field nstatic

Hello everyone,
I try to replicate the estimation of Iacoviello & Guerreri (2017), "Collateral Constraints and Macroeconomic asymmetries’ using their codes available here:(https://www.matteoiacoviello.com/research.htm).
Unfortunately, I have the following error message :
Reference to non-existent field ‘nstatic’.
Error in get_pq (line 5)
statevar_pos = (dr_.nstatic +1):(nvars-dr_.nfwrd);
Error in solve_two_constraints_firstcall (line 110)
[decrulea,decruleb]=get_pq(oo00_.dr);

Error in call_process_mod_files (line 61)
solve_two_constraints_firstcall(modnam_00,modnam_10,modnam_01,modnam_11);

Error in runsim_estimation (line 178)
call_process_mod_files

I try with different versions of dynare and each time I have the same error.
Has anyone had the same issue?

Please see


which should work with Dynare 4.5

Sorry I haven’t seen this post! Thanks for your reply. However, I have now the following error message :

Not enough input arguments.
Error in get_pq (line 5)*
statevar_pos = (M_.nstatic +1):(nvars-M_.nfwrd);*

Error in posteriorzlb (line 61)*
[decrulea,decruleb]=get_pq(oo00_.dr);*

Error in mhalgo (line 44)*
fval= feval(posterior_func,theta,varargin{:});

Error in runsim_metropolis (line 37)*
mhalgo(‘posteriorzlb’,params1,hessian_fmin,target_average,init_draws,ndraws,load_switch,jump,…

I use dynare 4.5.6 (I also try with 4.5.0 and I have the same message) as in the precedent discussion

The call to
[decrulea,decruleb]=get_pq(oo00_.dr);
needs to be
[decrulea,decruleb]=get_pq(oo00_.dr,M_);

Thanks you so much! It works perfectly.