I am working on a deterministic equilibrium model, and I would like to do a loop over an exogenous variable. Specifically, I want to calculate the steady-state and welfare over different levels of taxation. I have found some information about looping over parameters but nothing about exogenous variables. Where could I find information about this?
Thank you so much for your reply. I dont understand well what you say. I need to calculate the steady-state values, and welfare “variable v” for each level of tau from values 0.1 to 0.9. I was running the program each time changing the tau, but it is time consuming. I tried to use something like:
tau_varexo = 0.1:0.05:0.9;
for i=1:length(tau_varexo)
tau = tau_varexo(i);
simul(periods=200);
end;
But of course it doesn’t work for tau since it is not a parameter.
Then, I would like to get the results of each steady state in latex. I used “write_latex_steady_state_model;” but it is not recognized.
Unrecognized
function or variable
‘write_latex_steady_state_model’.
Error in Benchmark
(line 151)
write_latex_steady_state_model;
Error in dynare
(line 235)
evalin(‘base’,fname)
I am using Dynare 4.5.7 because it was the latest version that worked on my computer.
I am not sure I understand. If tau does not change over time, you can define it as a parameter. Also, why do you need a perfect foresight simulation if you are only interested in the steady state?
Right!! Previously I had a time varying tax so thats why I had it in exogenous variables. I didn’t think about changing it as a parameter. Now it is easier to do the loop.
Regarding the simulation, actually It I don’t need it anymore. I created it before because I had a technology shock and I was analyzing an impulse response.
Thanks you for your comments! It helped me to improve the code.