Hello all,
I try to obtain the predicted probabilities from a logit model.
Since I have not found anything by searching, I came up with this:
xtlogit X control_variables instruments if condition > 12, vce(bootstrap)
predict probability, xb
by id year: gen residuals = X - probability
The reason I do this is that I would like to follow the procedure proposed by Wooldridge:
xtlogit X exogenous_controls instruments
predict probability
xtivreg Y exogenous_controls (X = probability)
,where U is the outcome of interest and Y is the Treatment. In the original version, Wooldridge proposes a Probit Model and its not for the panel case.
(referenced to here: https://www.stata.com/statalist/arch.../msg00339.html)
Source:
Jeffrey M. Wooldridge, Econometric Analysis of Cross Section and Panel Data, MIT Press, 2002.
Here is the full model I would like to estimate on Cross-Validated, but I do not think Statalist would be appropriate to ask the question:
https://stats.stackexchange.com/ques...ion-term-endog
Comment