Hi all. I learnt so much from this thread so I decide to post my question here instead of starting a new one. I’m trying to get simulation samples with parameters updated.
code here:
list_alpha = [0.3 0.7 0.75 0.8 0.9];
first_time = 1;
for m=1:length(list_alpha)
if first_time
dynare dgp03 noclearall;
first_time = 0;
else
set_param_value('alpha',list_alpha(m)); % update alpha, get the simulation
info = stoch_simul(var_list_);
[sim_array]=get_simul_replications(M_,options_);
y_sim=squeeze(sim_array(strmatch('y',M_.endo_names,'exact'),:,:));
end
simdata = sim_array([1 2],:, :);
%----------------
%playing with the simulation sample
%----------------
end
The code works. My problem is that the results I got from the above code is quite different from the results when I manually update the alpha value in a new dynare/mod file. Any suggestion is welcomed.
Thank you all in advance.