全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Stata专版
7934 9
2016-08-28
悬赏 5 个论坛币 已解决
probit后求marginal effects,用mfx和margins得到不同结果,命令和结果如下,该如何选择
mfx, predict(p)
margins, dydx(*)

. ***********probit******
. xi: probit     know_op1    i.hi2  sup_hi no_relate_hiop private_com  i.pce i.edu    age_10 female  marital  hh_size i.sah  chronic01   urban_nbs migrant  i.region  i.wave,     vce(cluster communityID)

Probit regression                               Number of obs     =      7,153
                                                Wald chi2(26)     =     909.59
                                                Prob > chi2       =     0.0000
Log pseudolikelihood = -2113.7879               Pseudo R2         =     0.3710

                            (Std. Err. adjusted for 448 clusters in communityID)
--------------------------------------------------------------------------------
               |               Robust
      know_op1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
       _Ihi2_1 |   .8528435   .1685863     5.06   0.000     .5224203    1.183267
       _Ihi2_2 |   .5620086   .1903432     2.95   0.003     .1889429    .9350744
       _Ihi2_3 |   .2111758   .1191595     1.77   0.076    -.0223725    .4447242
       _Ihi2_7 |   .3166352    .211818     1.49   0.135    -.0985205     .731791
        sup_hi |   .2386233   .1385296     1.72   0.085    -.0328897    .5101364
no_relate_hiop |  -.4402445   .0704835    -6.25   0.000    -.5783896   -.3020995
   private_com |    -.23211   .0748275    -3.10   0.002    -.3787692   -.0854507
       _Ipce_2 |  -.0322339    .078004    -0.41   0.679    -.1851189    .1206512
       _Ipce_3 |   .1439423   .0813542     1.77   0.077     -.015509    .3033937
       _Ipce_4 |    .223455   .0813939     2.75   0.006     .0639258    .3829842
       _Ipce_5 |   .3445144   .0893926     3.85   0.000     .1693081    .5197208
       _Iedu_2 |  -.0351868   .0642408    -0.55   0.584    -.1610965    .0907229
       _Iedu_4 |   .1795316   .0707434     2.54   0.011     .0408771    .3181861
       _Iedu_5 |   .2437232   .0709141     3.44   0.001      .104734    .3827123
        age_10 |  -.0222211   .0297116    -0.75   0.455    -.0804547    .0360125
        female |   .0402776   .0517201     0.78   0.436     -.061092    .1416472
       marital |   .1445962   .0689958     2.10   0.036     .0093669    .2798256
       hh_size |   .0181902   .0162269     1.12   0.262    -.0136139    .0499942
       _Isah_3 |  -.0323329    .078616    -0.41   0.681    -.1864175    .1217516
       _Isah_4 |   .1252313   .0806585     1.55   0.121    -.0328564    .2833191
     chronic01 |   .0719539    .065815     1.09   0.274    -.0570412     .200949
     urban_nbs |   .2462554   .0855149     2.88   0.004     .0786492    .4138615
       migrant |   .1429982   .0611365     2.34   0.019     .0231729    .2628235
    _Iregion_1 |  -.1022717   .0943762    -1.08   0.279    -.2872457    .0827023
    _Iregion_2 |  -.2173583   .0900003    -2.42   0.016    -.3937558   -.0409609
   _Iwave_2013 |   2.307401    .091165    25.31   0.000     2.128721    2.486081
         _cons |  -.0186498   .2801454    -0.07   0.947    -.5677248    .5304251
--------------------------------------------------------------------------------

.
. ******mfx: marginal effects are same to dprobit but the P value is slightly different**********
. mfx, predict(p)

Marginal effects after probit
      y  = Pr(know_op1) (predict, p)
         =  .94889726
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
_Ihi2_1*|   .0547498      .00754    7.26   0.000   .039971  .069528   .126101
_Ihi2_2*|   .0394225      .00865    4.56   0.000   .022463  .056382   .059276
_Ihi2_3*|   .0242283      .01491    1.62   0.104  -.005002  .053459   .754509
_Ihi2_7*|   .0258767      .01301    1.99   0.047   .000384   .05137    .02139
  sup_hi*|   .0211255      .01029    2.05   0.040   .000962  .041289   .065427
no_re~op*|  -.0443826       .0067   -6.62   0.000  -.057516  -.03125   .574724
privat~m*|  -.0245692      .00804   -3.06   0.002  -.040318  -.00882   .487068
_Ipce_2*|  -.0034365      .00845   -0.41   0.684  -.019992  .013119   .201314
_Ipce_3*|   .0140766      .00741    1.90   0.058  -.000451  .028604     .1974
_Ipce_4*|   .0211095      .00712    2.97   0.003   .007162  .035057   .207186
_Ipce_5*|   .0310333      .00752    4.13   0.000   .016295  .045771   .219628
_Iedu_2*|   -.003757      .00699   -0.54   0.591  -.017466  .009952   .199776
_Iedu_4*|   .0173414      .00637    2.72   0.006    .00486  .029823   .213477
_Iedu_5*|   .0236759       .0067    3.53   0.000   .010538  .036814   .297777
  age_10 |   -.002332      .00307   -0.76   0.448  -.008358  .003694   6.03004
  female*|   .0042506      .00551    0.77   0.440  -.006548  .015049   .583531
marital*|   .0165034      .00869    1.90   0.058   -.00053  .033536   .855305
hh_size |   .0019089      .00172    1.11   0.268  -.001466  .005283   3.60939
_Isah_3*|  -.0034069      .00834   -0.41   0.683  -.019762  .012948   .424857
_Isah_4*|   .0130544      .00828    1.58   0.115  -.003171   .02928   .461904
chron~01*|   .0078098      .00747    1.05   0.296  -.006832  .022452   .785265
urban~bs*|   .0247684      .00823    3.01   0.003    .00864  .040897   .384454
migrant*|   .0142413      .00593    2.40   0.016   .002617  .025866   .271774
_Iregi~1*|  -.0110713       .0104   -1.07   0.287  -.031446  .009303   .317349
_Iregi~2*|  -.0243316      .01057   -2.30   0.021   -.04504 -.003623   .324759
_Iw~2013*|   .3427805      .01479   23.18   0.000   .313801   .37176   .536838
------------------------------------------------------------------------------
(*) dy/dx is for discrete change of dummy variable from 0 to 1




. ********margins:results are different from mfx********
. margins, dydx(*)

Average marginal effects                        Number of obs     =      7,153
Model VCE    : Robust

Expression   : Pr(know_op1), predict()
dy/dx w.r.t. : _Ihi2_1 _Ihi2_2 _Ihi2_3 _Ihi2_7 sup_hi no_relate_hiop private_com _Ipce_2 _Ipce_3 _Ipce_4 _Ipce_5
               _Iedu_2 _Iedu_4 _Iedu_5 age_10 female marital hh_size _Isah_3 _Isah_4 chronic01 urban_nbs migrant
               _Iregion_1 _Iregion_2 _Iwave_2013

--------------------------------------------------------------------------------
               |            Delta-method
               |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------+----------------------------------------------------------------
       _Ihi2_1 |   .1426389   .0278602     5.12   0.000     .0880338    .1972439
       _Ihi2_2 |   .0939965   .0316918     2.97   0.003     .0318816    .1561113
       _Ihi2_3 |   .0353194   .0198865     1.78   0.076    -.0036576    .0742963
       _Ihi2_7 |   .0529575   .0353638     1.50   0.134    -.0163542    .1222693
        sup_hi |     .03991   .0231971     1.72   0.085    -.0055556    .0853755
no_relate_hiop |  -.0736313   .0112974    -6.52   0.000    -.0957737   -.0514889
   private_com |  -.0388206   .0123499    -3.14   0.002    -.0630259   -.0146154
       _Ipce_2 |  -.0053911   .0130446    -0.41   0.679    -.0309582    .0201759
       _Ipce_3 |   .0240745   .0135809     1.77   0.076    -.0025436    .0506926
       _Ipce_4 |   .0373731   .0136402     2.74   0.006     .0106387    .0641074
       _Ipce_5 |   .0576204   .0149916     3.84   0.000     .0282373    .0870034
       _Iedu_2 |   -.005885   .0107444    -0.55   0.584    -.0269437    .0151737
       _Iedu_4 |   .0300268   .0117906     2.55   0.011     .0069177    .0531359
       _Iedu_5 |   .0407629   .0118613     3.44   0.001     .0175151    .0640107
        age_10 |  -.0037165   .0049508    -0.75   0.453    -.0134198    .0059868
        female |   .0067365    .008655     0.78   0.436     -.010227       .0237
       marital |   .0241839   .0115329     2.10   0.036     .0015797     .046788
       hh_size |   .0030423   .0027168     1.12   0.263    -.0022825    .0083672
       _Isah_3 |  -.0054077   .0131561    -0.41   0.681    -.0311932    .0203778
       _Isah_4 |   .0209451   .0134409     1.56   0.119    -.0053987    .0472888
     chronic01 |   .0120344    .011028     1.09   0.275    -.0095801    .0336488
     urban_nbs |   .0411864    .014114     2.92   0.004     .0135236    .0688493
       migrant |   .0239166   .0102094     2.34   0.019     .0039066    .0439266
    _Iregion_1 |   -.017105   .0156972    -1.09   0.276     -.047871    .0136609
    _Iregion_2 |  -.0363534   .0148805    -2.44   0.015    -.0655187   -.0071881
   _Iwave_2013 |    .385915   .0135659    28.45   0.000     .3593263    .4125037
--------------------------------------------------------------------------------

最佳答案

蓝色 查看完整内容

Title [R] mfx -- Obtain marginal effects or elasticities after estimation Syntax mfx [compute] [, options] mfx replay [, level(#)] options Description -------------------------------------------------------------------------------------------- Model predict(predict_option) calculate marginal effects (elasticities) for predict_ ...
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2016-8-28 11:14:32
Title
    [R] mfx -- Obtain marginal effects or elasticities after estimation
Syntax
        mfx [compute] [if] [in] [, options]
        mfx replay [, level(#)]
    options                      Description
    --------------------------------------------------------------------------------------------
    Model
      predict(predict_option)    calculate marginal effects (elasticities) for predict_option
      varlist(varlist)           calculate marginal effects (elasticities) for varlist
      dydx                       calculate marginal effects; the default
      eyex                       calculate elasticities in the form of d(lny)/d(lnx)
      dyex                       calculate elasticities in the form of d(y)/d(lnx)
      eydx                       calculate elasticities in the form of d(lny)/d(x)
      nodiscrete                 treat dummy (indicator) variables as continuous
      nose                       do not calculate standard errors

    Model 2
      at(atlist)                 calculate marginal effects (elasticities) at these values
      noesample                  do not restrict calculation of means and medians to the
                                   estimation sample
      nowght                     ignore weights when calculating means and medians

    Adv. model
      nonlinear                  do not use the linear method
      force                      calculate marginal effects and standard errors when it would
                                   otherwise refuse to do so

    Reporting
      level(#)                   set confidence level; default is level(95)
      diagnostics(beta)          report suitability of marginal-effect calculation
      diagnostics(vce)           report suitability of standard-error calculation
      diagnostics(all)           report all diagnostic information
      tracelvl(#)                report increasing levels of detail during calculations
    --------------------------------------------------------------------------------------------
    where atlist is numlist or matname or

            [mean|median|zero] [varname = # [, varname = #] [...]]
        where mean is the default.
Menu
    Statistics > Postestimation > Marginal effects or elasticities
Description
    mfx numerically calculates the marginal effects or the elasticities and their standard
    errors after estimation.  Exactly what mfx can calculate is determined by the previous
    estimation command and the predict(predict_option) option.  The values at which the marginal
    effects or elasticities are to be evaluated is determined by the at(atlist) option.  By
    default, mfx calculates the marginal effects or elasticities at the means of the independent

    variables by using the default prediction option associated with the previous estimation
    command.
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-28 12:47:03
边际效应一般有三中(均值处边际、平均边际效应等),是不是算的不同呢?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-28 13:05:48
506232839 发表于 2016-8-28 12:47
边际效应一般有三中(均值处边际、平均边际效应等),是不是算的不同呢?
. mfx, predict(p):只显示是Marginal effects after probit,和dprobit结果一样,但是分辨不出来是平均边际效应还是均值边际效应

. margins, dydx(*):给出的是平均边际效应Average marginal effects

margins, dydx(*) atmeans: 给出的是均值边际效应Conditional marginal effects  

但是,上述三个结果都不一样,怎么解释呢?请问一般来讲,文章中应该是给出哪个边际效应?平均边际效应?
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-28 15:32:16

mfx
marginal,dydx(*) atmeans
是一样的啊





. probit foreign weight mpg, vce(cluster rep78 )


Iteration 0:   log pseudolikelihood = -42.400729  
Iteration 1:   log pseudolikelihood = -23.850457  
Iteration 2:   log pseudolikelihood = -22.426125  
Iteration 3:   log pseudolikelihood = -22.393086  
Iteration 4:   log pseudolikelihood = -22.393084  
Iteration 5:   log pseudolikelihood = -22.393084  


Probit regression                                 Number of obs   =         69
                                                  Wald chi2(2)    =      35.04
                                                  Prob > chi2     =     0.0000
Log pseudolikelihood = -22.393084                 Pseudo R2       =     0.4719


                                  (Std. Err. adjusted for 5 clusters in rep78)
------------------------------------------------------------------------------
             |               Robust
     foreign |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |  -.0024925   .0004409    -5.65   0.000    -.0033567   -.0016283
         mpg |  -.0932576   .0157639    -5.92   0.000    -.1241543   -.0623609
       _cons |   8.449857   1.123072     7.52   0.000     6.248676    10.65104
------------------------------------------------------------------------------


. mfx, predict(p)


Marginal effects after probit
      y  = Pr(foreign) (predict, p)
         =  .13722907
------------------------------------------------------------------------------
variable |      dy/dx    Std. Err.     z    P>|z|  [    95% C.I.   ]      X
---------+--------------------------------------------------------------------
  weight |  -.0005473      .00023   -2.34   0.019  -.001006 -.000089   3032.03
     mpg |  -.0204762      .00932   -2.20   0.028  -.038734 -.002218   21.2899
------------------------------------------------------------------------------


. margins, dydx(*) atmeans


Conditional marginal effects                      Number of obs   =         69
Model VCE    : Robust


Expression   : Pr(foreign), predict()
dy/dx w.r.t. : weight mpg
at           : weight          =    3032.029 (mean)
               mpg             =    21.28986 (mean)


------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |  -.0005473   .0002341    -2.34   0.019     -.001006   -.0000885
         mpg |  -.0204762   .0093155    -2.20   0.028    -.0387342   -.0022182
------------------------------------------------------------------------------


. margins, dydx(*)


Average marginal effects                          Number of obs   =         69
Model VCE    : Robust


Expression   : Pr(foreign), predict()
dy/dx w.r.t. : weight mpg


------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
      weight |  -.0004428   .0000122   -36.35   0.000    -.0004667    -.000419
         mpg |  -.0165691   .0013456   -12.31   0.000    -.0192065   -.0139318
------------------------------------------------------------------------------


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

2016-8-28 16:58:34
Bartus's margeff routine computers average marginal effects, each of which is slightly smaller than that computed at the point of sample means by mfx (Baum, 2006 p.253).
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群