Hi,
I saw the following example on the slides for the dynare summer school 2019 on the macro-processing language. I wonder if it is possible to adapt this example such that the nth_co is not the US, but simply the first (or second,…) element of the “countries” vector. That way, I do not need to manually change the nth_co if I happen to kick the US out of the model.
Thanks.
@#define countries = [ “US”, “EA”, “AS”, “JP”, “RC” ]
@#define nth_co = “US”
@#for co in countries
var Y_@{co} K_@{co} L_@{co} i_@{co} E_@{co} …;
parameters a_@{co} …;
varexo …;
@#endfor
model;
@#for co in countries
Y_@{co} = K_@{co}^a_@{co} * L_@{co}^(1-a_@{co});
…
@# if co != nth_co
(1+i_@{co}) = (1+i_@{nth_co}) * E_@{co}(+1) / E_@{co}; // UIP relation
@# else
E_@{co} = 1;
@# endif
@#endfo