Attached is the dynare code of my model, I wanted to draw the indifference curve linking alpha and delta for the Y isocurves, but I don’t know how to do it, I would be grateful if there is someone who will help me.
Thanks in advance
OT.mod (631 Bytes)
You did not even attempt to implement the loop as outlined at
I have made several attempts, and the result indicates that it does not know the contour function.
Then provide the mod-file.
Enclosed you will find the new dynare code, including the looping on the two parameters, and the tracing function. But the result is negative.
OT.mod (1.4 KB)
The basic code should be something along the lines of
y_pos=strmatch('Y',M_.endo_names,'exact'); alpha_parameters = 0.1:0.05:1; delta_parameters = 0.1:0.3:0.8; [alpha_mat, delta_mat]=meshgrid(alpha_parameters,delta_parameters); temp_mat=NaN(size(alpha_mat)); for alpha_iter=1:length(alpha_parameters) for delta_iter=1:length(delta_parameters) set_param_value('alpha',alpha_mat(delta_iter,alpha_iter)); set_param_value('delta',delta_mat(delta_iter,alpha_iter)); [oo_.steady_state,M_.params,info] = steady_(M_,options_,oo_); if ~info temp_mat(delta_iter,alpha_iter)=oo_.steady_state(y_pos); end end end; contour(alpha_mat,delta_mat,temp_mat)
But you most probably need a
steady_state_model-block as the steady state is not found for many parameter combinations.
Thank you so much Professor @jpfeifer, you have helped me in a lot of things in my research. Thank you very much.