I am running a regression where the dependent variable is a group-level mean, so following the advice of Angrist and Pischke (2009) and Solon et al. (2015), I am running Weighted Least Squares (WLS) where the weights are the group sizes:
reg y i.T [aweight=groupSize]
Because I have a small number of groups (36), I would like to conduce inference via the bootstrap. However, I find that the built-in vce(bootstrap)method returns an error when weights are specified, and the Stata manual ([R] Base Reference, pg. 154) states
This leads me to wonder if there is a statistical reason that bootstrapping should not be combined with weighted estimators, or if this is just something that happens not to have been coded into Stata.
I have experimented with the user-written boottest command, and found that this does not return an error after a weighted regression. Neither its help file nor the accompanying Stata Journal paper (Roodman et al 2019) warn against weights, and Appendix A of the paper discusses observation weights (although it does not mention whether anything needs to be done in the boottest command to implement this).
Many thanks for any advice,
Bert
PS:
Stata 17.0 MP born_date = "08 Mar 2023"
Windows 11
boottest 4.1.0 13 July 2022
Angrist, J. D., & Pischke, J.-S. (2009). Mostly Harmless Econometrics: An Empiricist’s Companion. Princeton University Press.
Roodman, D., Nielsen, M. Ø., MacKinnon, J. G., & Webb, M. D. (2019). Fast and wild: Bootstrap inference in Stata using boottest. Stata Journal, 19(1), 4–60. https://doi.org/10.1177/1536867X19830877
Solon, G., Haider, S. J., & Wooldridge, J. M. (2015). What Are We Weighting For? Journal of Human Resources, 50(2), 301–316. https://doi.org/10.3368/jhr.50.2.301
reg y i.T [aweight=groupSize]
Because I have a small number of groups (36), I would like to conduce inference via the bootstrap. However, I find that the built-in vce(bootstrap)method returns an error when weights are specified, and the Stata manual ([R] Base Reference, pg. 154) states
bootstrap is not meant to be used with weighted calculations.
I have experimented with the user-written boottest command, and found that this does not return an error after a weighted regression. Neither its help file nor the accompanying Stata Journal paper (Roodman et al 2019) warn against weights, and Appendix A of the paper discusses observation weights (although it does not mention whether anything needs to be done in the boottest command to implement this).
Many thanks for any advice,
Bert
PS:
Stata 17.0 MP born_date = "08 Mar 2023"
Windows 11
boottest 4.1.0 13 July 2022
Angrist, J. D., & Pischke, J.-S. (2009). Mostly Harmless Econometrics: An Empiricist’s Companion. Princeton University Press.
Roodman, D., Nielsen, M. Ø., MacKinnon, J. G., & Webb, M. D. (2019). Fast and wild: Bootstrap inference in Stata using boottest. Stata Journal, 19(1), 4–60. https://doi.org/10.1177/1536867X19830877
Solon, G., Haider, S. J., & Wooldridge, J. M. (2015). What Are We Weighting For? Journal of Human Resources, 50(2), 301–316. https://doi.org/10.3368/jhr.50.2.301
Comment