I tried to solve the code related to NK_linear_forward_guidance. But, distance.m file gives an error below. mod.file still works and provides outputs.
Not enough input arguments.
Error in distance (line 33)
oo_.exo_simul(M_.maximum_lag+1:M_.maximum_lag+length(shock_values),strmatch(shock_name,M_.exo_names,‘exact’))=shock_values;
Now the line number fits. But the error message suggests you are trying to call distance.m directly. That will not work. You need to run the mod-file. It will call the m-file.
For perfect foresight simulation, is it compulsory that the model block must be in non-linear form? Or is it possible to use linear model for the simulation?
I sent you an email last week along with my thesis mod files. I don’t know if you got the email. I will appreciate if I can book an appointment with you to discuss some of my challenges.