I am running a difference in differences regression with Panel data on Stata version 14.2.
I have state-level clustered standard errors, but since there are only 32 states in my data I want to use bootstrapping to correct for bias in the standard errors.
Since I am using survey data I need to include weights [pweight]. These are, however, incompatible with the bootstraps option after reg.
I was recommended the boottest command, but I have trouble getting the results out of Stata into a table.
I run the following code:
Code:
reg violence treat i.state i.year [pweight=factor] if year>2003, cluster(ent)
matrix v = e(V)
matrix b = e(b)
boottest treat=0, boottype(wild) seed(22)
matrix v[1,1] = (_b[treat]/r(t))^2
eststo: ereturn post b v
sum violence if year>2003
local N = r(N)
local mean = r(mean)
estadd scalar m = `mean'
estadd scalar obs = `N'
#delimit ;
esttab, b(%-9.3f) se(%-9.3f) noobs keep(treat) nonotes nogaps
mlabels(, none) nonumbers style(tex) fragment replace noline
label stats(obs m, fmt(%9.0gc %5.3f)
label("\\ Observations" "Mean of Dependent Variable"));
#delimit cr
Code:
eststo: ereturn post b v
last estimation results not found, nothing to store r(301);
Any idea how to fix this? I have been trying around with eststo and naming my estimation but all I get Stata to display is the coefficient&standard error from the OLS regression.
Any help is greatly appreciated.
Mia
0 Response to Exporting/displaying boottest results
Post a Comment