Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: Margeff with oprobit


From   Nicolas Herault <nherault@unimelb.edu.au>
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: Margeff with oprobit
Date   Mon, 10 Aug 2009 11:11:59 +1000

I do have the same version as you.

One of the reasons I am using margeff rather than mfx is that I want average marginal effects rather than marginal effects at the mean.

Below is a simple model, where jlpyrs is the number of years in a jobless household (ranging from 0 to 7).

You will see that the marginal effects obtained with margeff (for gender) are much smaller than the ones computed ‘manually’ (variables t0 to 7 below).

 

I did the same experiment with mlogit, probit and xtprobit and I did get for these models the same values for both marginal effects. That’s why I am wondering whether there is a bug in margeff after oprobit.

 

. oprobit jlpyrs1 gender age

 

Iteration 0:   log likelihood = -4482.9115

Iteration 1:   log likelihood = -4426.1931

Iteration 2:   log likelihood = -4426.0798

Iteration 3:   log likelihood = -4426.0798

 

Ordered probit regression                         Number of obs   =       5063

                                                  LR chi2(2)      =     113.66

                                                  Prob > chi2     =     0.0000

Log likelihood = -4426.0798                       Pseudo R2       =     0.0127

 

------------------------------------------------------------------------------

     jlpyrs1 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

      gender |  -.2000074   .0388654    -5.15   0.000    -.2761821   -.1238327

         age |   .0184501    .001925     9.58   0.000     .0146772     .022223

-------------+----------------------------------------------------------------

       /cut1 |   1.447378   .0794277                      1.291703    1.603053

       /cut2 |   1.698119   .0802337                      1.540864    1.855374

       /cut3 |   1.856428   .0810219                      1.697628    2.015228

       /cut4 |   1.988807   .0818218                      1.828439    2.149174

       /cut5 |   2.107942   .0826557                       1.94594    2.269944

       /cut6 |   2.220859   .0835591                      2.057086    2.384632

       /cut7 |   2.449037   .0858606                      2.280753     2.61732

------------------------------------------------------------------------------

 

. margeff compute, dummies(gender) count

 

Average partial effects after oprobit

      y  = Pr(jlpyrs1)

 

------------------------------------------------------------------------------

    variable |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]

-------------+----------------------------------------------------------------

0            |

      gender |   .0101312   .0024466     4.14   0.000      .005336    .0149264

         age |  -.0009372   .0001174    -7.99   0.000    -.0011672   -.0007072

-------------+----------------------------------------------------------------

1            |

      gender |  -.0041591   .0009832    -4.23   0.000    -.0060862    -.002232

         age |   .0003835   .0000484     7.92   0.000     .0002887    .0004784

-------------+----------------------------------------------------------------

2            |

      gender |  -.0018261   .0004549    -4.01   0.000    -.0027178   -.0009344

         age |   .0001687   .0000238     7.07   0.000      .000122    .0002154

-------------+----------------------------------------------------------------

3            |

      gender |  -.0011467   .0002968    -3.86   0.000    -.0017284    -.000565

         age |   .0001061   .0000163     6.51   0.000     .0000741     .000138

-------------+----------------------------------------------------------------

4            |

      gender |  -.0007903   .0002117    -3.73   0.000    -.0012052   -.0003755

         age |   .0000732   .0000121     6.05   0.000     .0000495    .0000969

-------------+----------------------------------------------------------------

5            |

      gender |  -.0005767   .0001596    -3.61   0.000    -.0008894   -.0002639

         age |   .0000535   9.46e-06     5.66   0.000      .000035     .000072

-------------+----------------------------------------------------------------

6            |

      gender |  -.0007793   .0002127    -3.66   0.000    -.0011963   -.0003623

         age |   .0000724   .0000121     5.99   0.000     .0000487    .0000961

-------------+----------------------------------------------------------------

7            |

      gender |  -.0008529   .0002425    -3.52   0.000    -.0013281   -.0003777

         age |   .0000797    .000014     5.70   0.000     .0000523    .0001072

------------------------------------------------------------------------------

 

. predict p0-p7

(option pr assumed; predicted probabilities)

 

. replace gender = 0

(2470 real changes made)

 

. predict a0-a7

(option pr assumed; predicted probabilities)

 

. replace gender = 1

(5063 real changes made)

 

. predict b0-b7

(option pr assumed; predicted probabilities)

 

. forval i = 0/7{

  2. gen t`i' = b`i' - a`i'

  3. }

 

. sum t?

 

    Variable |       Obs        Mean    Std. Dev.       Min        Max

-------------+--------------------------------------------------------

          t0 |      5063    .0559895    .0083395   .0390145   .0704771

          t1 |      5063   -.0116048    .0004624  -.0120314  -.0101325

          t2 |      5063   -.0072334    .0004286  -.0076197  -.0060018

          t3 |      5063   -.0057244    .0005597  -.0063758  -.0043622

          t4 |      5063   -.0047819     .000624  -.0056904  -.0033971

-------------+--------------------------------------------------------

          t5 |      5063   -.0041453     .000661  -.0052198  -.0027662

          t6 |      5063   -.0071023    .0014138  -.0096342  -.0043449

          t7 |      5063   -.0153973     .004964    -.02606  -.0071643




© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index