Hi everyone
I would like to export the p values of the Arellano Bond test for autocorrelation to my Excel output (the post estimation command of xtabond: estat abond). I am using the below code but it does not properly export the p value for the test for order 2. I would be grateful if you could advise what would be the error in my code.
Thanks in advance.
Jala
local ivar1 a
local ivar2 b
local ivar3 c
forv i=1/3 {
xi: xtabond y control1 control2 control3 `ivar`i'' i.year, vce(gmm) twostep
estat abond
local p1= 2*normal(e(arm1))
local p2= 2*normal(e(arm2))
outreg2 using "$temp_dir\results.xls", keep(l.y control1 control2 control3 `ivar`i'') label addtext(Time fixed effects, Yes) addstat(Z-stat. Arellano Bond test of autocorrelation in FD errors (order 1), e(arm1), P-value of Arellano Bond test of autocorrelation in FD errors (order 1), `p1', Z-stat. Arellano Bond test of autocorrelation in FD errors (order 2), e(arm2), P-value of Arellano Bond test of autocorrelation in FD errors (order 2), `p2')
}
I would like to export the p values of the Arellano Bond test for autocorrelation to my Excel output (the post estimation command of xtabond: estat abond). I am using the below code but it does not properly export the p value for the test for order 2. I would be grateful if you could advise what would be the error in my code.
Thanks in advance.
Jala
local ivar1 a
local ivar2 b
local ivar3 c
forv i=1/3 {
xi: xtabond y control1 control2 control3 `ivar`i'' i.year, vce(gmm) twostep
estat abond
local p1= 2*normal(e(arm1))
local p2= 2*normal(e(arm2))
outreg2 using "$temp_dir\results.xls", keep(l.y control1 control2 control3 `ivar`i'') label addtext(Time fixed effects, Yes) addstat(Z-stat. Arellano Bond test of autocorrelation in FD errors (order 1), e(arm1), P-value of Arellano Bond test of autocorrelation in FD errors (order 1), `p1', Z-stat. Arellano Bond test of autocorrelation in FD errors (order 2), e(arm2), P-value of Arellano Bond test of autocorrelation in FD errors (order 2), `p2')
}
Comment