Hello,
I have two questions:
1) I am a bit confused about the result of these two commands( mfx vs margins). I am working with a dataset and from what I have read, if I type the command mfx, I should get the marginal effects at the means. This is what I get:
Marginal effects after logit
y = Pr(low) (predict)
= .29199716
------------------------------------------------------------------------------
variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X
---------+--------------------------------------------------------------------
age | -.0060635 .00697 -0.87 0.384 -.019718 .007591 23.2381
lwt | -.0020595 .00125 -1.65 0.098 -.004501 .000382 129.815
race | .0999547 .04172 2.40 0.017 .018182 .181727 1.84656
smoke*| .2261239 .07997 2.83 0.005 .06938 .382868 .391534
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1
However, if I do the command: margins, dydx(x) atmeans I get:
Conditional marginal effects Number of obs = 189
Model VCE : OIM
Expression : Pr(low), predict()
dy/dx w.r.t. : age lwt race smoke
at : age = 23.2381 (mean)
lwt = 129.8148 (mean)
race = 1.846561 (mean)
smoke = .3915344 (mean)
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
age | -.0060635 .0069667 -0.87 0.384 -.0197179 .007591
lwt | -.0020595 .0012455 -1.65 0.098 -.0045006 .0003816
race | .0999547 .0417213 2.40 0.017 .0181825 .181727
smoke | .2191961 .0765979 2.86 0.004 .0690669 .3693253
------------------------------------------------------------------------------
why that diference for smoke ?
2) how can I get the result y = Pr(low) (predict) = .29199716 using the command margins instead of mfx ?
thank you
AMD
I have two questions:
1) I am a bit confused about the result of these two commands( mfx vs margins). I am working with a dataset and from what I have read, if I type the command mfx, I should get the marginal effects at the means. This is what I get:
Marginal effects after logit
y = Pr(low) (predict)
= .29199716
------------------------------------------------------------------------------
variable | dy/dx Std. Err. z P>|z| [ 95% C.I. ] X
---------+--------------------------------------------------------------------
age | -.0060635 .00697 -0.87 0.384 -.019718 .007591 23.2381
lwt | -.0020595 .00125 -1.65 0.098 -.004501 .000382 129.815
race | .0999547 .04172 2.40 0.017 .018182 .181727 1.84656
smoke*| .2261239 .07997 2.83 0.005 .06938 .382868 .391534
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1
However, if I do the command: margins, dydx(x) atmeans I get:
Conditional marginal effects Number of obs = 189
Model VCE : OIM
Expression : Pr(low), predict()
dy/dx w.r.t. : age lwt race smoke
at : age = 23.2381 (mean)
lwt = 129.8148 (mean)
race = 1.846561 (mean)
smoke = .3915344 (mean)
------------------------------------------------------------------------------
| Delta-method
| dy/dx Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
age | -.0060635 .0069667 -0.87 0.384 -.0197179 .007591
lwt | -.0020595 .0012455 -1.65 0.098 -.0045006 .0003816
race | .0999547 .0417213 2.40 0.017 .0181825 .181727
smoke | .2191961 .0765979 2.86 0.004 .0690669 .3693253
------------------------------------------------------------------------------
why that diference for smoke ?
2) how can I get the result y = Pr(low) (predict) = .29199716 using the command margins instead of mfx ?
thank you
AMD
Comment