You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using ivreghdfe 1.1.1 with ivreg2 4.1.11 on Stata 17 (Windows 10).
I want to estimate the predicted probability after having run an IV regression of the log odds ratio on covariates and fixed effects.
Here is what I run:
ivreghdfe log_odds_ratio (X = Z ) C [pw=weights], absorb(year county_fe) cluster(state)
predictnl pred_prob=exp(predict(xbd))/(1+exp(predict(xbd))) , se(pred_prob_se)
which returns:
you must add the resid option to reghdfe before running this prediction
predict(xbd) invalid
r(198);
then adding the resid option returns:
ivreghdfe log_odds_ratio (X = Z ) C [pw=weights], absorb(year county_fe) cluster(state) resid
predictnl pred_prob=exp(predict(xbd))/(1+exp(predict(xbd))) , se(pred_prob_se)
expression is a function of possibly stochastic quantities other than e(b)
r(498);
(Note: using margins instead of predictnl returns the exact same errors).
Any suggestions on how to estimate non-linear predictions with many fixed?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
Hello Sergio,
I am using ivreghdfe 1.1.1 with ivreg2 4.1.11 on Stata 17 (Windows 10).
I want to estimate the predicted probability after having run an IV regression of the log odds ratio on covariates and fixed effects.
Here is what I run:
ivreghdfe log_odds_ratio (X = Z ) C [pw=weights], absorb(year county_fe) cluster(state)
predictnl pred_prob=exp(predict(xbd))/(1+exp(predict(xbd))) , se(pred_prob_se)
which returns:
you must add the resid option to reghdfe before running this prediction
predict(xbd) invalid
r(198);
then adding the resid option returns:
ivreghdfe log_odds_ratio (X = Z ) C [pw=weights], absorb(year county_fe) cluster(state) resid
predictnl pred_prob=exp(predict(xbd))/(1+exp(predict(xbd))) , se(pred_prob_se)
expression is a function of possibly stochastic quantities other than e(b)
r(498);
(Note: using margins instead of predictnl returns the exact same errors).
Any suggestions on how to estimate non-linear predictions with many fixed?
Thanks a lot!
The text was updated successfully, but these errors were encountered: