Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: setting cross-group constraints using gologit2


From   Richard Williams <[email protected]>
To   [email protected]
Subject   Re: st: setting cross-group constraints using gologit2
Date   Thu, 17 May 2007 21:54:18 -0500

At 12:03 PM 5/17/2007, William Magee wrote:
Dear Statalist Members,

I am trying to set constraints on cutpoints in gologit2
(whether that is a good idea or not is also a question)
I'm not sure why you would want to do that, or how you would decide what the constraints should be, but it is possible. As noted in the gologit2 help file, "When using the constraint command, it is usually easiest and safest to refer to equations by their equation #, e.g. #1, #2, etc." Ergo,

. use "http://www.indiana.edu/~jslsoc/stata/spex_data/ordwarm2.dta";
(77 & 89 General Social Survey)

. constraint 1 [#1]_cons = 2
. constraint 2 [#2]_cons = .5
. constraint 3 [#3]_cons = -1
. gologit2 warm yr89 male white, cons(1-3)

Generalized Ordered Logit Estimates Number of obs = 2293
Wald chi2(9) = 245.40
Prob > chi2 = 0.0000
Log likelihood = -2907.343 Pseudo R2 = 0.0295

( 1) [1SD]_cons = 2
( 2) [2D]_cons = .5
( 3) [3A]_cons = -1
------------------------------------------------------------------------------
warm | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
1SD |
yr89 | 1.068941 .1484313 7.20 0.000 .7780213 1.359861
male | -.2354959 .1186701 -1.98 0.047 -.4680849 -.0029068
white | -.3554515 .0957235 -3.71 0.000 -.5430661 -.167837
_cons | 2 . . . . .
-------------+----------------------------------------------------------------
2D |
yr89 | .6031904 .0857522 7.03 0.000 .4351192 .7712616
male | -.57481 .0821098 -7.00 0.000 -.7357422 -.4138779
white | -.2764247 .0674725 -4.10 0.000 -.4086685 -.144181
_cons | .5 . . . . .
-------------+----------------------------------------------------------------
3A |
yr89 | .3915407 .1036324 3.78 0.000 .1884249 .5946565
male | -.996458 .1176216 -8.47 0.000 -1.226992 -.7659239
white | -.3369808 .0834112 -4.04 0.000 -.5004638 -.1734977
_cons | -1 . . . . .
------------------------------------------------------------------------------

This will also work - don't ask why, it just does :)

. constraint 1 [eq1]_cons = 2
. constraint 2 [eq2]_cons = .5
. constraint 3 [eq3]_cons = -1
. gologit2 warm yr89 male white, cons(1-3)
[same output as above]


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: [email protected]
WWW: http://www.nd.edu/~rwilliam

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




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