Properly inserting the exogenous process in the model
Posted: Tue Aug 30, 2016 7:07 pm
Hi all,
This is somehow related to an older post of mine. I have a two-sector, two-country model that is calibrated. The exogenous process is the TFP in each sector and each country, hence I have four shocks and four exogenous variables.
where 1 and 2 are countries and T and N are sectors. I estimate the persistence parameters and the variance-covariance matrix outside the model and then I calibrate the values when running the model in Dynare (stoch_simul). To do the estimations, I extract Solow residuals as: ln(Z_ij) = ln(Y_ij) - (1-alpha)*ln(N_ij) for each country i = {1,2} ans sector j = {T, N}, where Y is output and N is hours. Here I emphasise that I perform the estimations in logs!
I want to have a log-linearised model, and I let Dynare do it. Thus, I insert the equations into my model as follows:
Is that the correct way?? From reading J. Pfeiffer's guide on observation equations it seems to be ok. But is it also ok that the Solow residuals were defined/estimated in logs? Again here I want to emphasise that I do not have exp(Z.,.) but " just" Z.,. in levels in defining the exogenous process in the Dynare code. And what does that mean on how my equations appear "on paper", i.e. output is
Thanks in advance and sorry if some questions seem primitive.
Best,
Kyriacos
This is somehow related to an older post of mine. I have a two-sector, two-country model that is calibrated. The exogenous process is the TFP in each sector and each country, hence I have four shocks and four exogenous variables.
- Code: Select all
zT1 = A1T_11*zT1(-1) + A1T_12*zT2(-1) + A1T_13*zN1(-1) + A1T_14*zN2(-1) + eT1 ;
zT2 = A2T_11*zT1(-1) + A2T_12*zT2(-1) + A2T_13*zN1(-1) + A2T_14*zN2(-1) + eT2 ;
zN1 = A1N_11*zT1(-1) + A1N_12*zT2(-1) + A1N_13*zN1(-1) + A1N_14*zN2(-1) + eN1 ;
zN2 = A2N_11*zT1(-1) + A2N_12*zT2(-1) + A2N_13*zN1(-1) + A2N_14*zN2(-1) + eN2 ;
where 1 and 2 are countries and T and N are sectors. I estimate the persistence parameters and the variance-covariance matrix outside the model and then I calibrate the values when running the model in Dynare (stoch_simul). To do the estimations, I extract Solow residuals as: ln(Z_ij) = ln(Y_ij) - (1-alpha)*ln(N_ij) for each country i = {1,2} ans sector j = {T, N}, where Y is output and N is hours. Here I emphasise that I perform the estimations in logs!
I want to have a log-linearised model, and I let Dynare do it. Thus, I insert the equations into my model as follows:
- Code: Select all
model;
zT1 = A1T_11*zT1(-1) + A1T_12*zT2(-1) + A1T_13*zN1(-1) + A1T_14*zN2(-1) + eT1 ;
zT2 = A2T_11*zT1(-1) + A2T_12*zT2(-1) + A2T_13*zN1(-1) + A2T_14*zN2(-1) + eT2 ;
zN1 = A1N_11*zT1(-1) + A1N_12*zT2(-1) + A1N_13*zN1(-1) + A1N_14*zN2(-1) + eN1 ;
zN2 = A2N_11*zT1(-1) + A2N_12*zT2(-1) + A2N_13*zN1(-1) + A2N_14*zN2(-1) + eN2 ;
.....
% Output
exp(yT_I1) = exp(zT1)*exp(ST1)^alphaT_1*exp(nT1)^(1-alphaT_1) ;
exp(yT_I2) = exp(zT2)*exp(ST2)^alphaT_2*exp(nT2)^(1-alphaT_2) ;
exp(yN1) = exp(zN1)*exp(SN1)^alphaN_1*exp(nN1)^(1-alphaN_1) ;
exp(yN2) = exp(zN2)*exp(SN2)^alphaN_2*exp(nN2)^(1-alphaN_2) ;
....
end;
Is that the correct way?? From reading J. Pfeiffer's guide on observation equations it seems to be ok. But is it also ok that the Solow residuals were defined/estimated in logs? Again here I want to emphasise that I do not have exp(Z.,.) but " just" Z.,. in levels in defining the exogenous process in the Dynare code. And what does that mean on how my equations appear "on paper", i.e. output is
- Y = exp(Z)*K^alpha * N^(1-alpha)
- Y = Z*K^alpha * N^(1-alpha)
Thanks in advance and sorry if some questions seem primitive.
Best,
Kyriacos