Dear all,
I have an issue that the first step estimation predicts the residual (actually is the last residual) but the second stage is the teffects estimators.
To get a consistent standard error, the only way I know so far is using bootstrap. Recently, I heard that the new Cameron (2022) book claims that we can use a GMM method instead, but the author didn't say it very clearly.
Does anyone know how to solve this issue? Actually I am facing a three-step estimation problem...
Here is the example:
global $xlistreg2 are house characteristics
global $xlistreg1 are independent variables I am interested
mbsmoke is the dummy variable like in birthweight data used by Cattaneo (2010)
regress logPrice_Sale_ $xlistreg, robust
predict y_hat,
gen residual=logPrice_Sale_-y_hat
sort houseid Close_year Closetime Closeday
by houseid: gen last_residual=residual[_n-1]
The second regression is the teffects doubly robust estimator:
teffects aipw (logPrice_Sale_ last_residual $xlistreg1 $xlistreg2 ) (mbsmoke last_residual $xlistreg1 $xlistreg2, logit), aequations
I have an issue that the first step estimation predicts the residual (actually is the last residual) but the second stage is the teffects estimators.
To get a consistent standard error, the only way I know so far is using bootstrap. Recently, I heard that the new Cameron (2022) book claims that we can use a GMM method instead, but the author didn't say it very clearly.
Does anyone know how to solve this issue? Actually I am facing a three-step estimation problem...
Here is the example:
global $xlistreg2 are house characteristics
global $xlistreg1 are independent variables I am interested
mbsmoke is the dummy variable like in birthweight data used by Cattaneo (2010)
regress logPrice_Sale_ $xlistreg, robust
predict y_hat,
gen residual=logPrice_Sale_-y_hat
sort houseid Close_year Closetime Closeday
by houseid: gen last_residual=residual[_n-1]
The second regression is the teffects doubly robust estimator:
teffects aipw (logPrice_Sale_ last_residual $xlistreg1 $xlistreg2 ) (mbsmoke last_residual $xlistreg1 $xlistreg2, logit), aequations
