I am interested in the marginal effect of the continuous endogenous regressor X1 on the binary outcome Y and estimate:
Code:
ivprobit y x2 i.x3 i.x4 (x1=z) margins, dydx(x1) predict(pr) post outreg2 using table, excel
Apparently I can do the estimation only with -ivprobit- as -ivlogit- does not exist (I do not understand why) and -ivreg2- would yield biased results.
To obtain marginal effects, I cannot use -margeff- (which seems not to work after -ivprobit-), and -margins- seems preferable over the older -mfx compute- in that it computes the Average Marginal Effect (AME) rather than a Marginal Effect at Means (MEM) which may be unrealistic given that my control regressors include dummy variables.
Studying earlier posts also suggested that I should write -i.*- in front of any binary variable in the regression, and that I need to use the -post- option after -margins- to ensure marginal effects rather than coefficients are displayed in my Excel output. With the -predict(pr)- option, margins does indeed display something different from the coefficients already displayed by the regression itself.
What does not work though:
Although the coefficient on X1 is positive, the marginal effect displayed is negative. I understand that the marginal effect here is the change in the probability of obtaining Y=1 instead of Y=0 as X1 increases from 0 to 1 (?), which can be negative even thoughthe probability itself must be bounded by 0 and 1. But I do not understand why this change would be negative when the coefficient (the "log odds ratio"?) is positive? Note that this problem occurs when I estimate -ivprobit- but not when I estimate -probit- (thus ignoring the endogeneity of X1). So I assume it has to do with the IV aspect.
The most helpful (of many) existing posts on this I could find was this: https://www.statalist.org/forums/forum/general-stata-discussion/general/1509122-ivprobit-coefficient-is-negative-but-margin-is-positive Here Prof. Wooldridge and others suggested that marginal effect and coefficient should indeed have the same sign and that the solution may be to not include the instrument z in the marginal effects computation. After starting out with -dydx(*)- I used -dydx(x1 x2 x3)- as well as just -dydx(x1)- but neither solved the problem and I understand the post as saying it didn't solve it there either, although no one could explain why. I suppose the -dydx()- option specifies only for which covariates to compute, but not based on which equation. But I do not see which other option would solve this problem instead.
I'd be very grateful if someone could help here. Searching the web and this Forum, the problem seems to have struck many users, but I could not yet find a solution?
Thanks so much, PM
0 Response to -margins,predict(pr)- after -ivprobit- yields opposite sign from coefficients
Post a Comment