Skip to main content
changed headers for the margins,predict categories
Source Link

Then run the -margins- command for each category. CategoryREP78 category == LowestPoor

CategoryREP78 category == LowerFair

CategoryREP78 category == MiddleAverage

CategoryREP78 category == HigherGood

CategoryREP78 category == HighestExcellent

Then run the -margins- command for each category. Category == Lowest

Category == Lower

Category == Middle

Category == Higher

Category == Highest

Then run the -margins- command for each category. REP78 category == Poor

REP78 category == Fair

REP78 category == Average

REP78 category == Good

REP78 category == Excellent

Source Link

  1. You only get one coefficient in an ordinal probit model because you are actually fitting the model for a latent continuous variable y* (rather than, say, the log-odds of each alternative relative to the base alternative in a multinomial logit model). Think about it this way: The ordinal variable categories are rankings, such that although your outcomes may have been coded as 0, 1, 2, 3, 4, etc., the "distance" between category 0 and category 1 may not be the same as the distance between category 1 and category 2, and so on. For example, if the ordinal variable was a patient's response to the question of how well he or she can perform a specific activity of daily living unassisted, and the categories are:

    0 - Not well at all
    1 - Somewhat not well
    2 - Neutral
    3 - Somewhat well
    4 - Extremely well
    

    The distance between "Not well at all" and "Somewhat not well" may not be the same as the distance between "Somewhat not well" and "Neutral"

    By definition, y* is unobservable, but we can model the thresholds (boundaries)for each category. In Stata, along with coefficients for your model covariates, you should have also got (k-1) intercepts, where k is the number of categories in your ordinal outcome variable. These intercepts are given as /cut1, /cut2, ... ,/cut(k-1).

  2. You would compute the average marginal effects of a categorical predictor after running -oprobit- just as you would other models, and that is by using the -margins- command. Note that you need to specify which category you want the average marginal effects for, otherwise Stata will choose a category for you.

A trivial example:

First fit the model

. webuse fullauto,clear
(Automobile Models)

. xtile pricequint=price,n(5)

. label define pq 1"Lowest" 2"Lowest" 3"Middle" 4"Higher" 5"Highest",replace

. label value priceq pq

. oprobit rep78  i.pricequint

Iteration 0:   log likelihood = -93.692061  
Iteration 1:   log likelihood = -92.643441  
Iteration 2:   log likelihood = -92.643323  
Iteration 3:   log likelihood = -92.643323  

Ordered probit regression                         Number of obs   =         69
                                                  LR chi2(4)      =       2.10
                                                  Prob > chi2     =     0.7178
Log likelihood = -92.643323                       Pseudo R2       =     0.0112

------------------------------------------------------------------------------
       rep78 |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |  -.1271055   .4100538    -0.31   0.757    -.9307962    .6765851
     Middle  |  -.0845474   .3940693    -0.21   0.830     -.856909    .6878142
     Higher  |   .3882535   .4029081     0.96   0.335    -.4014319    1.177939
    Highest  |   .1246315   .4102926     0.30   0.761    -.6795273    .9287903
-------------+----------------------------------------------------------------
       /cut1 |  -1.865516   .3978601                     -2.645308   -1.085725
       /cut2 |  -1.013338   .3095532                     -1.620051    -.406625
       /cut3 |   .2638664   .3002598                     -.3246321    .8523649
       /cut4 |   1.076626   .3157065                      .4578531      1.6954
------------------------------------------------------------------------------

Then run the -margins- command for each category. Category == Lowest

. margins, dydx(*) predict(outcome(1)) 

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

Expression   : Pr(rep78==1), predict(outcome(1))
dy/dx w.r.t. : 2.pricequint 3.pricequint 4.pricequint 5.pricequint

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |   .0100147   .0330296     0.30   0.762    -.0547221    .0747515
     Middle  |   .0064042   .0300529     0.21   0.831    -.0524983    .0653067
     Higher  |  -.0189492     .02406    -0.79   0.431    -.0661059    .0282074
    Highest  |  -.0077672   .0258943    -0.30   0.764    -.0585191    .0429847
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

Category == Lower

. margins, dydx(*) predict(outcome(2)) 

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

Expression   : Pr(rep78==2), predict(outcome(2))
dy/dx w.r.t. : 2.pricequint 3.pricequint 4.pricequint 5.pricequint

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |   .0222821   .0722996     0.31   0.758    -.1194225    .1639866
     Middle  |   .0146452    .068373     0.21   0.830    -.1193634    .1486538
     Higher  |  -.0559815    .059961    -0.93   0.350    -.1735029    .0615399
    Highest  |  -.0201156   .0663317    -0.30   0.762    -.1501233    .1098922
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

Category == Middle

. margins, dydx(*) predict(outcome(3)) 

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

Expression   : Pr(rep78==3), predict(outcome(3))
dy/dx w.r.t. : 2.pricequint 3.pricequint 4.pricequint 5.pricequint

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |   .0157357   .0511898     0.31   0.759    -.0845945    .1160659
     Middle  |   .0111273   .0523686     0.21   0.832    -.0915133    .1137679
     Higher  |  -.0786234   .0835623    -0.94   0.347    -.2424024    .0851556
    Highest  |  -.0208081   .0692807    -0.30   0.764    -.1565958    .1149797
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

Category == Higher

. margins, dydx(*) predict(outcome(4)) 

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

Expression   : Pr(rep78==4), predict(outcome(4))
dy/dx w.r.t. : 2.pricequint 3.pricequint 4.pricequint 5.pricequint

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |  -.0215554   .0697354    -0.31   0.757    -.1582343    .1151234
     Middle  |  -.0141387   .0658856    -0.21   0.830    -.1432722    .1149947
     Higher  |   .0487688   .0536304     0.91   0.363    -.0563448    .1538823
    Highest  |   .0189647   .0623698     0.30   0.761    -.1032778    .1412071
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

Category == Highest

. margins, dydx(*) predict(outcome(5)) 

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

Expression   : Pr(rep78==5), predict(outcome(5))
dy/dx w.r.t. : 2.pricequint 3.pricequint 4.pricequint 5.pricequint

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |   -.026477   .0854652    -0.31   0.757    -.1939857    .1410317
     Middle  |   -.018038   .0843658    -0.21   0.831    -.1833919    .1473159
     Higher  |   .1047854   .1095801     0.96   0.339    -.1099878    .3195585
    Highest  |   .0297262   .0983159     0.30   0.762    -.1629695    .2224219
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

What happens when we don't specify a category in our -margins- command?

. margins, dydx(*)

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

Expression   : Pr(rep78==1), predict()
dy/dx w.r.t. : 2.pricequint 3.pricequint 4.pricequint 5.pricequint

------------------------------------------------------------------------------
             |            Delta-method
             |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
  pricequint |
     Lowest  |   .0100147   .0330296     0.30   0.762    -.0547221    .0747515
     Middle  |   .0064042   .0300529     0.21   0.831    -.0524983    .0653067
     Higher  |  -.0189492     .02406    -0.79   0.431    -.0661059    .0282074
    Highest  |  -.0077672   .0258943    -0.30   0.764    -.0585191    .0429847
------------------------------------------------------------------------------
Note: dy/dx for factor levels is the discrete change from the base level.

Stata chose a category for us for the marginal effects calculation, in this case, the category chosen was 1 (lowest)