In a two-step test, standard errors need to adjusted to account for generated regressor(s) (which are estimated from some first-stage reduced form). I use a non-parametric pairs bootstrap across the two stages to obtain the standard errors (standard deviation of the estimates obtained from the bootstrap reps). But what is the reported "Observed Coef." in the bootstrap output in a two-step procedure?
In a one-step regression, the coefficient from a vanilla OLS regress command and the observed coefficient form the bootstrapped regression are the same, because the bootstrapped output reports the original coefficient estimate. ("Although the average, theta_bar, of the bootstrapped estimates is used in calculating the standard deviation, it is not used as the estimated value of the statistic itself." from http://www.stata.com/manuals13/rbootstrap.pdf)
***start code**************
use http://www.stata-press.com/data/r13/auto
regress mpg weight gear
bootstrap, reps(100) seed(1): regress mpg weight gear
***end code**************
However, when I use bootstrap to run a 2SLS, the observed coefficient is not the original coefficient. Then, what is it, since it is not the average coefficient estimate from the bootstrap repetitions? For example, Observed Coef. of w_hat = -.0056947; while in contrast, if I were to use my original sample through the first and second stage regressions, the coefficient on weight_hat = -.0055945.
Thank you in advance to whoever can explain what the "Observed Coef." is in a bootstrapped 2-step test.
***start code**************
regress weight length trunk headroom
predict weight_hat, xb
regress mpg weight_hat gear
***end code**************
------------------------------------------------------------------------------
mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight_hat | -.0055945 .0007801 -7.17 0.000 -.0071499 -.0040391
gear_ratio | 1.534804 1.257303 1.22 0.226 -.9721878 4.041796
_cons | 33.56247 5.702259 5.89 0.000 22.19248 44.93245
------------------------------------------------------------------------------
***start code**************
cap program drop twostagereg
program define twostagereg
qreg weight length trunk headroom
cap drop w_hat /*drop w_hat if it is already defined*/
predict w_hat
regress mpg w_hat gear
end
bootstrap, reps(99) seed(1): twostagereg
***end code**************
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
mpg | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
w_hat | -.0056947 .0007574 -7.52 0.000 -.0071791 -.0042103
gear_ratio | 1.527298 1.395432 1.09 0.274 -1.2077 4.262295
_cons | 33.72083 5.690657 5.93 0.000 22.56735 44.87431
------------------------------------------------------------------------------
Note: The simple 2SLS specification in my example can also use "ivreg", but in more complex specifications when estimated regressors include more than just one fitted value (perhaps two estimated fitted values and an estimated residual), bootstrapping can accommodate these other combinations of RHS variables.
In a one-step regression, the coefficient from a vanilla OLS regress command and the observed coefficient form the bootstrapped regression are the same, because the bootstrapped output reports the original coefficient estimate. ("Although the average, theta_bar, of the bootstrapped estimates is used in calculating the standard deviation, it is not used as the estimated value of the statistic itself." from http://www.stata.com/manuals13/rbootstrap.pdf)
***start code**************
use http://www.stata-press.com/data/r13/auto
regress mpg weight gear
bootstrap, reps(100) seed(1): regress mpg weight gear
***end code**************
However, when I use bootstrap to run a 2SLS, the observed coefficient is not the original coefficient. Then, what is it, since it is not the average coefficient estimate from the bootstrap repetitions? For example, Observed Coef. of w_hat = -.0056947; while in contrast, if I were to use my original sample through the first and second stage regressions, the coefficient on weight_hat = -.0055945.
Thank you in advance to whoever can explain what the "Observed Coef." is in a bootstrapped 2-step test.
***start code**************
regress weight length trunk headroom
predict weight_hat, xb
regress mpg weight_hat gear
***end code**************
------------------------------------------------------------------------------
mpg | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
weight_hat | -.0055945 .0007801 -7.17 0.000 -.0071499 -.0040391
gear_ratio | 1.534804 1.257303 1.22 0.226 -.9721878 4.041796
_cons | 33.56247 5.702259 5.89 0.000 22.19248 44.93245
------------------------------------------------------------------------------
***start code**************
cap program drop twostagereg
program define twostagereg
qreg weight length trunk headroom
cap drop w_hat /*drop w_hat if it is already defined*/
predict w_hat
regress mpg w_hat gear
end
bootstrap, reps(99) seed(1): twostagereg
***end code**************
------------------------------------------------------------------------------
| Observed Bootstrap Normal-based
mpg | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
w_hat | -.0056947 .0007574 -7.52 0.000 -.0071791 -.0042103
gear_ratio | 1.527298 1.395432 1.09 0.274 -1.2077 4.262295
_cons | 33.72083 5.690657 5.93 0.000 22.56735 44.87431
------------------------------------------------------------------------------
Note: The simple 2SLS specification in my example can also use "ivreg", but in more complex specifications when estimated regressors include more than just one fitted value (perhaps two estimated fitted values and an estimated residual), bootstrapping can accommodate these other combinations of RHS variables.