I want to bootstrap the standard errors with 1000 replications. In my regression specification standard errors are clustered. How can I do this?
-
Login or Register
- Log in with
. use "C:\Program Files\Stata17\ado\base\a\auto.dta" (1978 automobile data) . regress price mpg, vce(bootstrap, reps(200) seed(12345) dots(1)) (running regress on estimation sample) Bootstrap replications (200) ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 .................................................. 50 .................................................. 100 .................................................. 150 .................................................. 200 Linear regression Number of obs = 74 Replications = 200 Wald chi2(1) = 18.91 Prob > chi2 = 0.0000 R-squared = 0.2196 Adj R-squared = 0.2087 Root MSE = 2623.6529 ------------------------------------------------------------------------------ | Observed Bootstrap Normal-based price | coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- mpg | -238.8943 54.9405 -4.35 0.000 -346.5758 -131.2129 _cons | 11253.06 1319.023 8.53 0.000 8667.824 13838.3 ------------------------------------------------------------------------------ . regress price mpg, vce(bootstrap, reps(200) seed(12345) dots(1)) (running regress on estimation sample) Bootstrap replications (200) ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 .................................................. 50 .................................................. 100 .................................................. 150 .................................................. 200 Linear regression Number of obs = 74 Replications = 200 Wald chi2(1) = 18.91 Prob > chi2 = 0.0000 R-squared = 0.2196 Adj R-squared = 0.2087 Root MSE = 2623.6529 ------------------------------------------------------------------------------ | Observed Bootstrap Normal-based price | coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- mpg | -238.8943 54.9405 -4.35 0.000 -346.5758 -131.2129 _cons | 11253.06 1319.023 8.53 0.000 8667.824 13838.3 ------------------------------------------------------------------------------ . regress price mpg, vce(bootstrap, reps(200) dots(1)) (running regress on estimation sample) Bootstrap replications (200) ----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 .................................................. 50 .................................................. 100 .................................................. 150 .................................................. 200 Linear regression Number of obs = 74 Replications = 200 Wald chi2(1) = 18.65 Prob > chi2 = 0.0000 R-squared = 0.2196 Adj R-squared = 0.2087 Root MSE = 2623.6529 ------------------------------------------------------------------------------ | Observed Bootstrap Normal-based price | coefficient std. err. z P>|z| [95% conf. interval] -------------+---------------------------------------------------------------- mpg | -238.8943 55.31386 -4.32 0.000 -347.3075 -130.4812 _cons | 11253.06 1316.147 8.55 0.000 8673.46 13832.66 ------------------------------------------------------------------------------ .
Comment