Re: st: Ordered Logit - Interact cut points

 From Richard Williams To "statalist@hsphsun2.harvard.edu" , "statalist@hsphsun2.harvard.edu" Subject Re: st: Ordered Logit - Interact cut points Date Wed, 18 Mar 2009 16:09:20 -0500

```At 01:42 PM 3/18/2009, Jason Dean, Mr wrote:
```
Hi there, I am wondering if there is a way to interact the cut points within the ologit command.
```

```
I am doing analysis between immigrant and native-born workers - when I run separate ologit's the cut points are much different between groups.
```
```
However, I need to calculate the standard errors of the difference in predicted probabilities.
```
```
If I could combine both groups into one equation and interact all variables this would be easy as I could just use the nlcom to calculate the difference and standard errors.
```
Is there a way to use nlcom with two separately run ologit regressions?
```
```
```
To put the problem another way: In OLS regression, there are two ways we could estimate separate models for 2 groups. We could either run separate regressions,
```
reg y x if grp == 0
reg y x if grp == 1

Or we could run a single model with interaction terms, e.g.

gen grpx = grp * x
reg y x grp grpx

```
Alas, that doesn't work with ologit. In OLS, the above allows the intercepts to differ, but in ologit you still have the problem that the cut points are constrained to be the same across groups.
```
```
I believe you can get around that by using gologit2, available from SSC. Try something like
```
. use "http://www.indiana.edu/~jslsoc/stata/spex_data/ordwarm2.dta";, clear
(77 & 89 General Social Survey)

. gen yr89male = yr89 * male

. gologit2 warm yr89 if male == 0, pl

Generalized Ordered Logit Estimates               Number of obs   =       1227
Wald chi2(1)    =      23.92
Prob > chi2     =     0.0000
Log likelihood = -1597.2201                       Pseudo R2       =     0.0075

( 1)  [1SD]yr89 - [2D]yr89 = 0
( 2)  [2D]yr89 - [3A]yr89 = 0
------------------------------------------------------------------------------
warm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
1SD          |
yr89 |   .5162222    .105551     4.89   0.000     .3093461    .7230983
_cons |    1.85993   .0981139    18.96   0.000      1.66763     2.05223
-------------+----------------------------------------------------------------
2D           |
yr89 |   .5162222    .105551     4.89   0.000     .3093461    .7230983
_cons |   .2867994   .0736006     3.90   0.000     .1425448     .431054
-------------+----------------------------------------------------------------
3A           |
yr89 |   .5162222    .105551     4.89   0.000     .3093461    .7230983
_cons |  -1.346833   .0829257   -16.24   0.000    -1.509364   -1.184302
------------------------------------------------------------------------------

. gologit2 warm yr89 if male == 1, pl

Generalized Ordered Logit Estimates               Number of obs   =       1066
Wald chi2(1)    =      34.69
Prob > chi2     =     0.0000
Log likelihood = -1321.8641                       Pseudo R2       =     0.0131

( 1)  [1SD]yr89 - [2D]yr89 = 0
( 2)  [2D]yr89 - [3A]yr89 = 0
------------------------------------------------------------------------------
warm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
1SD          |
yr89 |   .6919058   .1174714     5.89   0.000     .4616661    .9221454
_cons |   1.521822   .0937338    16.24   0.000     1.338107    1.705537
-------------+----------------------------------------------------------------
2D           |
yr89 |   .6919058   .1174714     5.89   0.000     .4616661    .9221454
_cons |  -.3636584   .0771198    -4.72   0.000    -.5148105   -.2125063
-------------+----------------------------------------------------------------
3A           |
yr89 |   .6919058   .1174714     5.89   0.000     .4616661    .9221454
_cons |   -2.44437   .1148228   -21.29   0.000    -2.669419   -2.219322
------------------------------------------------------------------------------

. gologit2 warm  yr89 yr89male male, npl(male) lrf

Generalized Ordered Logit Estimates               Number of obs   =       2293
LR chi2(5)      =     153.37
Prob > chi2     =     0.0000
Log likelihood = -2919.0842                       Pseudo R2       =     0.0256

( 1)  [1SD]yr89 - [2D]yr89 = 0
( 2)  [1SD]yr89male - [2D]yr89male = 0
( 3)  [2D]yr89 - [3A]yr89 = 0
( 4)  [2D]yr89male - [3A]yr89male = 0
------------------------------------------------------------------------------
warm |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
1SD          |
yr89 |   .5162222    .105551     4.89   0.000     .3093461    .7230984
yr89male |   .1756836   .1579257     1.11   0.266    -.1338452    .4852123
male |   -.338108   .1356921    -2.49   0.013    -.6040597   -.0721563
_cons |    1.85993   .0981139    18.96   0.000     1.667631     2.05223
-------------+----------------------------------------------------------------
2D           |
yr89 |   .5162222    .105551     4.89   0.000     .3093461    .7230984
yr89male |   .1756836   .1579257     1.11   0.266    -.1338452    .4852123
male |  -.6504578   .1066045    -6.10   0.000    -.8593988   -.4415168
_cons |   .2867994   .0736006     3.90   0.000     .1425449     .431054
-------------+----------------------------------------------------------------
3A           |
yr89 |   .5162222    .105551     4.89   0.000     .3093461    .7230984
yr89male |   .1756836   .1579257     1.11   0.266    -.1338452    .4852123
male |  -1.097537   .1416367    -7.75   0.000     -1.37514   -.8199342
_cons |  -1.346833   .0829257   -16.24   0.000    -1.509364   -1.184302
------------------------------------------------------------------------------

```
The first two gologit2 commands, with the pl option, give the same results as ologit (except you have constants instead of cut points). The 3rd command, with the npl option, allows the cutpoints to differ by gender.
```
```
if you've never heard of gologit2 before this may all be quite cryptic (and possibly not worth the trouble to learn if this isn't that important to you!) But for more info you can see
```
http://www.nd.edu/~rwilliam/gologit2/index.html

-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  Richard.A.Williams.5@ND.Edu
WWW:    http://www.nd.edu/~rwilliam

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/
```