Dear All,
I want to estimate a Poisson FE IV using the approach suggested by Jeff Wooldridge in C:\Users\wooldri1\Dropbox\semin (weilinmetrics.com). Following a previous post ivpoisson with panel-data fixed effects - Statalist I am trying to get the corrected standard error using panel boostrap. I need to run it on a few different samples and specifications so I try to run it in a loop as follows:
I am trying to return the coefficient estimates and the corrected SEs. But it simply stops; not sure why. It is likely something embarrassingly silly that I am doing wrong. Will be grateful for any help anyone may be able to offer to get this to run.
Many thanks in advance.
Sincerely,
Sumedha.
I want to estimate a Poisson FE IV using the approach suggested by Jeff Wooldridge in C:\Users\wooldri1\Dropbox\semin (weilinmetrics.com). Following a previous post ivpoisson with panel-data fixed effects - Statalist I am trying to get the corrected standard error using panel boostrap. I need to run it on a few different samples and specifications so I try to run it in a loop as follows:
Code:
. local IFFY1 "if (numbersibs>1)" // Just the sibling sub-sample
. local IFFY2 "" // Entire sample
.
. foreach C in id sibid{
2. foreach S in 1 2{
3.
. capture program drop myboot
4. program define myboot, rclass
5. preserve
6. bsample
7. xtset `C' year
8. xtreg LgrcxtotC c.year `IFFY`S'', fe
9. predict double LgrcxtotChat_fe, e
10.
. xtpoisson LgAneedc Lgm LgrcxtotChat_fe i.year `IFFY`S'', fe vce(robust)
11.
. return scalar bLgAneedc = _b[LgAneedc]
12. return scalar bLgm = _b[Lgm]
13. return scalar bLgrcxtotChat_fe = _b[LgrcxtotChat_fe]
14.
. return scalar seLgAneedc = _se[LgAneedc]
15. return scalar seLgm = _se[Lgm]
16. return scalar seLgrcxtotChat_fe = _se[LgrcxtotChat_fe]
17.
. restore
18. end
--Break--
r(1);
end of do-file
--Break--
r(1);
Many thanks in advance.
Sincerely,
Sumedha.

Comment