3
$\begingroup$

I'm considering a Probit model for the probability that a student will finish the course based on their hours of study, age, sex, origin, how they passed the previous course and labor market situation for students.

probit finish hours age women inmigrant previous_courses

Now with these estimates, I have to compute the number of hours of study necessary so that the probability of completing the course of a student who works is the same as that of another student with identical characteristics but who does not work.

I know I have to use the command margins but I can't figure out how. Any clue?

​​​​​​​Thanks in advance!

$\endgroup$
1
  • 2
    $\begingroup$ It would be helpful if you could include some more details or even better minimal working example... command margins for example exists in R but also Stata and probably in other softwares as well. Without even knowing what software you use its hard to give any recommendation and without MWE you can only get some general advice on how to use the command $\endgroup$
    – 1muflon1
    Jun 7, 2020 at 11:50

1 Answer 1

3
$\begingroup$

Let me give an example inspired by Richard William's presentation, and the Stata command margins.

webuse nhanes2f, clear
keep if !missing(diabetes, black, female, age, age2, agegrp)
gen femage = female*age
label variable femage "female * age interaction"
probit diabetes black female age, nolog

Probit regression                               Number of obs     =     10,335
                                                LR chi2(3)        =     380.15
                                                Prob > chi2       =     0.0000
Log likelihood =  -1808.992                     Pseudo R2         =     0.0951

------------------------------------------------------------------------------
    diabetes |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       black |   .3567259   .0638644     5.59   0.000      .231554    .4818978
      female |   .0859841   .0450391     1.91   0.056    -.0022909    .1742592
         age |   .0271895   .0016318    16.66   0.000     .0239912    .0303879
       _cons |  -3.215875   .1015044   -31.68   0.000     -3.41482    -3.01693
------------------------------------------------------------------------------

Among other things, the results show that getting older is bad for your health (surprise!) – but just how bad is it?

Adjusted predictions (also known as predictive margins) can make these results more tangible. With adjusted predictions, you specify values for each of the independent variables in the model, and then compute the probability of the event occurring for an individual who has those values. Using the mean values for the other independent variables (female, black) that are in the model, we get:

margins, at(age=(20(10)70)) atmeans

Adjusted predictions                            Number of obs     =     10,335
Model VCE    : OIM
Expression   : Pr(diabetes), predict()

1._at        : black           =    .1050798 (mean)
               female          =    .5250121 (mean)
               age             =          20
2._at        : black           =    .1050798 (mean)
               female          =    .5250121 (mean)
               age             =          30
3._at        : black           =    .1050798 (mean)
               female          =    .5250121 (mean)
               age             =          40
4._at        : black           =    .1050798 (mean)
               female          =    .5250121 (mean)
               age             =          50
5._at        : black           =    .1050798 (mean)
               female          =    .5250121 (mean)
               age             =          60
6._at        : black           =    .1050798 (mean)
               female          =    .5250121 (mean)
               age             =          70
 ------------------------------------------------------------------------------
             |            Delta-method
             |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         _at |
          1  |   .0063084   .0009888     6.38   0.000     .0043703    .0082465
          2  |   .0113751   .0013794     8.25   0.000     .0086715    .0140786
          3  |   .0204274   .0017892    11.42   0.000     .0169206    .0239342
          4  |   .0364184   .0021437    16.99   0.000     .0322167      .04062
          5  |   .0641081   .0028498    22.50   0.000     .0585226    .0696935
          6  |   .1104379    .005868    18.82   0.000     .0989369     .121939
------------------------------------------------------------------------------

The results show that a 20 year old has less than a 1 percent chance of having diabetes (.0063084), while an otherwise comparable 70 year old has an 11 percent chance (.1104379).

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.