Dear all,
I would like to run a regression testing different lag structures. In order to do so, since I have numerous models I'd like to test, I am trying to use macro but with scarce results.
More in detail (code below), I would like to regress my dependent variables strin_N and strin_M different lags of ks_C. In addition, since i need to run a lot of regression, I'd like to specify my explanatory variables using a global macro (in the example below Xforeign_KS). I tried the following command but it does not work. Stata does use the correct lags. Do you have any idea about why this is happening?
Thanks,
Enrico
forvalues i=0(1)2 {
global Xforeign_KS ks_A ks_B l`i'.ks_C
xtnbreg y strin_N $Xforeign_KS $Xcontrol i.year
outreg2 using modelN_lag`i'.doc, append ctitle(N.B. BVGR ) addtext(M)
xtnbreg y strin_M $Xforeign_KS $Xcontrol i.year
outreg2 using modelM_lag`i'.doc, append ctitle(N.B. BVGR - GREY) addtext(N)
}
*
I would like to run a regression testing different lag structures. In order to do so, since I have numerous models I'd like to test, I am trying to use macro but with scarce results.
More in detail (code below), I would like to regress my dependent variables strin_N and strin_M different lags of ks_C. In addition, since i need to run a lot of regression, I'd like to specify my explanatory variables using a global macro (in the example below Xforeign_KS). I tried the following command but it does not work. Stata does use the correct lags. Do you have any idea about why this is happening?
Thanks,
Enrico
forvalues i=0(1)2 {
global Xforeign_KS ks_A ks_B l`i'.ks_C
xtnbreg y strin_N $Xforeign_KS $Xcontrol i.year
outreg2 using modelN_lag`i'.doc, append ctitle(N.B. BVGR ) addtext(M)
xtnbreg y strin_M $Xforeign_KS $Xcontrol i.year
outreg2 using modelM_lag`i'.doc, append ctitle(N.B. BVGR - GREY) addtext(N)
}
*