Hello,
I posted a few days ago with a question about a strange result I get with Stata 16 and ivprobit, using the margins, dydx() predict(pr) syntax to obtain predicted probabilities. Specifically, I find that my endogenous X1 variable, which had a negative coefficient in the ivprobit results, has a positive marginal effect. I saw in an older post (linked below) that Stata 14.1 instituted a fix, based on Skeels & Taylor (2015), which "includes the instrumented variable equation in the computation."
My question is, is the "fix" producing a bug, or at least an overcorrection in certain cases, since it is apparently possible to have a marginal effect with the opposite sign from that of the estimated ivprobit coefficient? (If it is not a bug or an overcorrection, how does one report this strange result in a paper?)
To illustrate, I am including/attaching the results of my ivprobit regression, using the margins command from Stata 16, and the results of the older margins command (using version control, Stata 14) for comparison. See how the ivprobit coefficient is negative, but the estimated probability change is positive. The sign of the probability change reverts to negative when I use the Stata 14 version of margins and predict.
. ivprobit PROTBI (endogenous_X1=IV) X2 X3 X4 X5 X6 X7 X8 , vce(cluster orgId)
Probit model with endogenous regressors Number of obs = 1,492
Wald chi2(8) = 119.90
Log pseudolikelihood = -1403.5646 Prob > chi2 = 0.0000
(Std. Err. adjusted for 106 clusters in orgId)
------------------------------------------------------------------------------------------------
| Robust
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------------------------------------------+----------------------------------------------------------------
endogenous_X1 | -1.765481 .5107963 -3.46 0.001 -2.766624 -.7643387
X2 | .2941948 .506894 0.58 0.562 -.6992993 1.287689
X3 | .0003688 .0003185 1.16 0.247 -.0002554 .0009931
X4 | .2330729 .1933046 1.21 0.228 -.1457971 .6119429
X5 | .4271303 .198719 2.15 0.032 .0376481 .8166124
X6 | .5621895 .2282728 2.46 0.014 .1147831 1.009596
X7 | .2013893 .2776837 0.73 0.468 -.3428608 .7456393
X8 | .4314645 .1971322 2.19 0.029 .0450925 .8178365
_cons | -.15545 1.28781 -0.12 0.904 -2.679511 2.368611
----------------------------------------------+----------------------------------------------------------------
corr(e.endogenous_X1,e.PROTBI)| .8989229 .1475742 -.040347 .9947866
sd(e.endogenous_X1)| .4513452 .0497914 .3635852 .5602883
------------------------------------------------------------------------------------------------
Instrumented: endogenous_X1
Instruments: X2 X3 X4 X5 X6 X7 X8 IV
------------------------------------------------------------------------------------------------
Wald test of exogeneity (corr = 0): chi2(1) = 3.64 Prob > chi2 = 0.0565
. margins, dydx(endogenous_X1) predict(pr)
Average marginal effects Number of obs = 1,492
Model VCE : Robust
Expression : Probability of positive outcome, predict(pr)
dy/dx w.r.t. : endogenous_X1
-------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
----------------------+----------------------------------------------------------------
endogenous_X1 | .0908771 .1397807 0.65 0.516 -.1830882 .3648423
-------------------------------------------------------------------------------
. version 14: margins, dydx(endogenous_X1) predict(pr)
Average marginal effects Number of obs = 1,492
Model VCE : Robust
Expression : Prob of positive outcome when rho=0, predict(pr)
dy/dx w.r.t. : endogenous_X1
-------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
----------------------+----------------------------------------------------------------
endogenous_X1 | -.5541947 .2400751 -2.31 0.021 -1.024733 -.0836563
-------------------------------------------------------------------------------
References:
Old post: https://www.statalist.org/forums/for...ivprobit-a-bug
Skeels, C.L. and L.W. Taylor (2015) Prediction in linear index models with endogenous regressors, The Stata Journal (15), 627-644
I posted a few days ago with a question about a strange result I get with Stata 16 and ivprobit, using the margins, dydx() predict(pr) syntax to obtain predicted probabilities. Specifically, I find that my endogenous X1 variable, which had a negative coefficient in the ivprobit results, has a positive marginal effect. I saw in an older post (linked below) that Stata 14.1 instituted a fix, based on Skeels & Taylor (2015), which "includes the instrumented variable equation in the computation."
My question is, is the "fix" producing a bug, or at least an overcorrection in certain cases, since it is apparently possible to have a marginal effect with the opposite sign from that of the estimated ivprobit coefficient? (If it is not a bug or an overcorrection, how does one report this strange result in a paper?)
To illustrate, I am including/attaching the results of my ivprobit regression, using the margins command from Stata 16, and the results of the older margins command (using version control, Stata 14) for comparison. See how the ivprobit coefficient is negative, but the estimated probability change is positive. The sign of the probability change reverts to negative when I use the Stata 14 version of margins and predict.
. ivprobit PROTBI (endogenous_X1=IV) X2 X3 X4 X5 X6 X7 X8 , vce(cluster orgId)
Probit model with endogenous regressors Number of obs = 1,492
Wald chi2(8) = 119.90
Log pseudolikelihood = -1403.5646 Prob > chi2 = 0.0000
(Std. Err. adjusted for 106 clusters in orgId)
------------------------------------------------------------------------------------------------
| Robust
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------------------------------------------+----------------------------------------------------------------
endogenous_X1 | -1.765481 .5107963 -3.46 0.001 -2.766624 -.7643387
X2 | .2941948 .506894 0.58 0.562 -.6992993 1.287689
X3 | .0003688 .0003185 1.16 0.247 -.0002554 .0009931
X4 | .2330729 .1933046 1.21 0.228 -.1457971 .6119429
X5 | .4271303 .198719 2.15 0.032 .0376481 .8166124
X6 | .5621895 .2282728 2.46 0.014 .1147831 1.009596
X7 | .2013893 .2776837 0.73 0.468 -.3428608 .7456393
X8 | .4314645 .1971322 2.19 0.029 .0450925 .8178365
_cons | -.15545 1.28781 -0.12 0.904 -2.679511 2.368611
----------------------------------------------+----------------------------------------------------------------
corr(e.endogenous_X1,e.PROTBI)| .8989229 .1475742 -.040347 .9947866
sd(e.endogenous_X1)| .4513452 .0497914 .3635852 .5602883
------------------------------------------------------------------------------------------------
Instrumented: endogenous_X1
Instruments: X2 X3 X4 X5 X6 X7 X8 IV
------------------------------------------------------------------------------------------------
Wald test of exogeneity (corr = 0): chi2(1) = 3.64 Prob > chi2 = 0.0565
. margins, dydx(endogenous_X1) predict(pr)
Average marginal effects Number of obs = 1,492
Model VCE : Robust
Expression : Probability of positive outcome, predict(pr)
dy/dx w.r.t. : endogenous_X1
-------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
----------------------+----------------------------------------------------------------
endogenous_X1 | .0908771 .1397807 0.65 0.516 -.1830882 .3648423
-------------------------------------------------------------------------------
. version 14: margins, dydx(endogenous_X1) predict(pr)
Average marginal effects Number of obs = 1,492
Model VCE : Robust
Expression : Prob of positive outcome when rho=0, predict(pr)
dy/dx w.r.t. : endogenous_X1
-------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
----------------------+----------------------------------------------------------------
endogenous_X1 | -.5541947 .2400751 -2.31 0.021 -1.024733 -.0836563
-------------------------------------------------------------------------------
References:
Old post: https://www.statalist.org/forums/for...ivprobit-a-bug
Skeels, C.L. and L.W. Taylor (2015) Prediction in linear index models with endogenous regressors, The Stata Journal (15), 627-644
Comment