Dear Statalisters,
I have been trying to estimate the responsiveness of national manufacturing output to changes in energy prices with a panel regression analysis, but I have not found intuitive results, so I would really appreciate if someone has some input for this exercise. In short, my equation looks like the following:
ΔYit = a + B0ΔYit-1 + B1ΔELt-1 + B2ΔNGt-1 + B3ΔODt-1 + B4ΔXt-1 + et
Yit -> Manufacturing output for subsector i, year t
ELt-1 -> Electricity price, year t-1 (first energy price)
NGt-1 -> Natural gas price, year t-1 (second energy price)
ODt-1 -> Oil derivatives price, year t-1 (third energy price)
Xt-1 -> Vector of controls, year t-1 (includes the following variables: international oil prices, cost of capital, exchange rate, US industrial production, unit labor cost for subsector i)
All variables on the equation are in first-difference form, so I have been using % change to estimate this. Since I have monthly observations, % change has been measured for each month against the corresponding month last year (i.e, n-12). The purpose of lagging the regressors is to avoid simultaneity problems. This part of the code looks like the following (variable names in Spanish):
1) Generating % change variables
foreach i in tot_ali tot_alc_tab tot_tex tot_tex1 tot_ves tot_piel tot_mad tot_papel tot_impre tot_der_petr tot_quim tot_plas tot_mine tot_metal_ba tot_meta tot_maqui tot_compu tot_acce tot_trans tot_mueb tot_otros p_elec p_gas p_petro c_prec_petr c_costo_cap c_tc c_ipc cmo_tot_ali cmo_tot_alc_tab cmo_tot_tex cmo_tot_tex1 cmo_tot_ves cmo_tot_piel cmo_tot_mad cmo_tot_papel cmo_tot_impre cmo_tot_der_petr cmo_tot_quim cmo_tot_plas cmo_tot_mine cmo_tot_metal_ba cmo_tot_meta cmo_tot_maqui cmo_tot_compu cmo_tot_acce cmo_tot_trans cmo_tot_mueb cmo_tot_otros {
gen pc`i' = ((`i'[_n] / `i'[_n-12]) - 1)
}
2) Generating 1-period lagged % change variables
foreach i in pctot_ali pctot_alc_tab pctot_tex pctot_tex1 pctot_ves pctot_piel pctot_mad pctot_papel pctot_impre pctot_der_petr pctot_quim pctot_plas pctot_mine pctot_metal_ba pctot_meta pctot_maqui pctot_compu pctot_acce pctot_trans pctot_mueb pctot_otros pcp_elec pcp_gas pcp_petro pcc_prec_petr pcc_costo_cap pcc_tc pcc_ipc pccmo_tot_ali pccmo_tot_alc_tab pccmo_tot_tex pccmo_tot_tex1 pccmo_tot_ves pccmo_tot_piel pccmo_tot_mad pccmo_tot_papel pccmo_tot_impre pccmo_tot_der_petr pccmo_tot_quim pccmo_tot_plas pccmo_tot_mine pccmo_tot_metal_ba pccmo_tot_meta pccmo_tot_maqui pccmo_tot_compu pccmo_tot_acce pccmo_tot_trans pccmo_tot_mueb pccmo_tot_otros {
gen lag`i' = `i'[_n-12]
}
After that I just reshape some of the manufacturing and unit labor cost data to merge them according to the appropriate subsector, and, finally, regress the % manufacturing output variable against the lagged % change variables for energy prices and control variables. I feel I should be using xtreg, but I am not a very experienced in Stata so I might be doing an overkill.
Any thoughts would be greatly appreaciated. Thanks in advance.
Best,
Jose L.
I have been trying to estimate the responsiveness of national manufacturing output to changes in energy prices with a panel regression analysis, but I have not found intuitive results, so I would really appreciate if someone has some input for this exercise. In short, my equation looks like the following:
ΔYit = a + B0ΔYit-1 + B1ΔELt-1 + B2ΔNGt-1 + B3ΔODt-1 + B4ΔXt-1 + et
Yit -> Manufacturing output for subsector i, year t
ELt-1 -> Electricity price, year t-1 (first energy price)
NGt-1 -> Natural gas price, year t-1 (second energy price)
ODt-1 -> Oil derivatives price, year t-1 (third energy price)
Xt-1 -> Vector of controls, year t-1 (includes the following variables: international oil prices, cost of capital, exchange rate, US industrial production, unit labor cost for subsector i)
All variables on the equation are in first-difference form, so I have been using % change to estimate this. Since I have monthly observations, % change has been measured for each month against the corresponding month last year (i.e, n-12). The purpose of lagging the regressors is to avoid simultaneity problems. This part of the code looks like the following (variable names in Spanish):
1) Generating % change variables
foreach i in tot_ali tot_alc_tab tot_tex tot_tex1 tot_ves tot_piel tot_mad tot_papel tot_impre tot_der_petr tot_quim tot_plas tot_mine tot_metal_ba tot_meta tot_maqui tot_compu tot_acce tot_trans tot_mueb tot_otros p_elec p_gas p_petro c_prec_petr c_costo_cap c_tc c_ipc cmo_tot_ali cmo_tot_alc_tab cmo_tot_tex cmo_tot_tex1 cmo_tot_ves cmo_tot_piel cmo_tot_mad cmo_tot_papel cmo_tot_impre cmo_tot_der_petr cmo_tot_quim cmo_tot_plas cmo_tot_mine cmo_tot_metal_ba cmo_tot_meta cmo_tot_maqui cmo_tot_compu cmo_tot_acce cmo_tot_trans cmo_tot_mueb cmo_tot_otros {
gen pc`i' = ((`i'[_n] / `i'[_n-12]) - 1)
}
2) Generating 1-period lagged % change variables
foreach i in pctot_ali pctot_alc_tab pctot_tex pctot_tex1 pctot_ves pctot_piel pctot_mad pctot_papel pctot_impre pctot_der_petr pctot_quim pctot_plas pctot_mine pctot_metal_ba pctot_meta pctot_maqui pctot_compu pctot_acce pctot_trans pctot_mueb pctot_otros pcp_elec pcp_gas pcp_petro pcc_prec_petr pcc_costo_cap pcc_tc pcc_ipc pccmo_tot_ali pccmo_tot_alc_tab pccmo_tot_tex pccmo_tot_tex1 pccmo_tot_ves pccmo_tot_piel pccmo_tot_mad pccmo_tot_papel pccmo_tot_impre pccmo_tot_der_petr pccmo_tot_quim pccmo_tot_plas pccmo_tot_mine pccmo_tot_metal_ba pccmo_tot_meta pccmo_tot_maqui pccmo_tot_compu pccmo_tot_acce pccmo_tot_trans pccmo_tot_mueb pccmo_tot_otros {
gen lag`i' = `i'[_n-12]
}
After that I just reshape some of the manufacturing and unit labor cost data to merge them according to the appropriate subsector, and, finally, regress the % manufacturing output variable against the lagged % change variables for energy prices and control variables. I feel I should be using xtreg, but I am not a very experienced in Stata so I might be doing an overkill.
Any thoughts would be greatly appreaciated. Thanks in advance.
Best,
Jose L.
Comment