Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: Bootstrapping standard errors of regression coefficients whilst applying bysort command
From
George Murray <[email protected]>
To
[email protected]
Subject
st: Bootstrapping standard errors of regression coefficients whilst applying bysort command
Date
Sat, 28 Apr 2012 14:17:37 +1000
Dear Statalist,
I have a dataset with variables V0 V1 V2 V3 V4, where I am regressing
V1 on V2, V3 and V4 for each value of V0 (so without bootstrapping,
the command would be –bysort V0: reg V1 V2 V3 V4- to estimate a
separate model for each value of V0), however I have not been able to
come up with a command to compute the bootstrapped standard errors of
the explanatory variables for each model. My first instinct was to run
–bootstrap, reps(100) seed(1): bys V0: reg V1 V2 V3 V4-, however
clearly this is not feasible (the error message is “bysort may not be
used in this context r(199)”), and am yet to find an alternative. I
also need to save (a) the bias-corrected standard errors of the
constants and (b) the residuals, of each model. Is there a code that
can produce these results in Stata?
Regards,
George.
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/