The problem is that the preprocessor thinks that par is the name of a MATLAB function, because of the par(1) call. Then it crashes because using a function as an argument of fun_ss is not authorized. In the future, Dynare will provide a more explicit error message of the type
par is the name of a MATLAB/Octave function, and cannot be used as a variable.
You could avoid this by putting the whole par-part into a verbatim-block:
- Code: Select all
verbatim;
[par1 target]=calibration;
par2=fsolve(@(x) find_para([par1 x(1) x(2)],target),[0.1,5]);//compute calibrated parameters to target steady state values
par=[par1 par2];//par=[delta, eta, alpha, psi, A,z,r_star,tau_f_star,tau_star,tau,theta,phi,sigma,Psi]
delta=par(1);
eta=par(2);
alpha=par(3);
psi=par(4);
A=par(5);
z=par(6);
r_star=par(7);
tau_f_star=par(8);
tau_star=par(9);
tau=par(10);
theta=par(11);
phi=par(12);
sigma=par(13);
Psi=par(14);
end;
That way, par is hidden from Dynare and does not create confusion.
But this brings us to the next issue. You cannot use arbitrary auxiliary variables (F here) in the initval-block. Given that you want to use a function call in every interation to set an auxiliary variable, I am afraid you must use an explicit steady state-file.