----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Tuesday, July 22, 2003 6:38 AM
Subject: st: offsets
> Is it possible to have more than one offset in a logistic (or other)
> regression model?
>
> Specifically I have an ordered categorical variable representing levels of a
> clinical scoring system. I want to see what the added value of a new
> variable is, but I want to constrain the regression coefficients for the
> levels of the categorical variable to be unity.
>
> these are approaches I tried (dep is the ordered categorical variable) -
> none of which work:
>
> xi: logistic outcome1 i.dep ageatmi, offset(i.dep)
>
> logistic outcome1 _Idep_1 _Idep_2 _Idep_3 _Idep_4 ageatmi, offset( _Idep_1
> _Idep_2 _Idep_3 _Idep_4)
>
> logistic outcome1 _Idep_1 _Idep_2 _Idep_3 _Idep_4 ageatmi, offset( _Idep_1)
> offset( _Idep_2) offset( _Idep_3) offset( _Idep_4)
>
> Any thoughts?
>
> Paul Silcocks MSc, BM BCh, FRCPath, MFPHM, CStat
You could use -mlogit- with constraints to estimate a logit model with multiple
offsets.
Example
. use "C:\Stata8\auto.dta", clear
(1978 Automobile Data)
. xi i.rep
i.rep78 _Irep78_1-5 (naturally coded; _Irep78_1 omitted)
. constraint define 1 [Foreign]_Irep78_2 = 1
. constraint define 2 [Foreign]_Irep78_3 = 1
. constraint define 3 [Foreign]_Irep78_4 = 1
. constraint define 4 [Foreign]_Irep78_5 = 1
. mlogit foreign price gear _* , c(1-4)
Iteration 0: log likelihood = -49.584463
Iteration 1: log likelihood = -21.248164
Iteration 2: log likelihood = -17.091979
Iteration 3: log likelihood = -16.212473
Iteration 4: log likelihood = -16.137122
Iteration 5: log likelihood = -16.136264
Iteration 6: log likelihood = -16.136264
Multinomial logistic regression Number of obs = 69
LR chi2(2) = 66.90
Prob > chi2 = 0.0000
Log likelihood = -16.136264 Pseudo R2 = 0.6746
( 1) [Foreign]_Irep78_2 = 1
( 2) [Foreign]_Irep78_3 = 1
( 3) [Foreign]_Irep78_4 = 1
( 4) [Foreign]_Irep78_5 = 1
------------------------------------------------------------------------------
foreign | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
Foreign |
price | .0004787 .000196 2.44 0.015 .0000944 .0008629
gear_ratio | 7.562929 1.845069 4.10 0.000 3.94666 11.1792
_Irep78_2 | 1 . . . . .
_Irep78_3 | 1 . . . . .
_Irep78_4 | 1 . . . . .
_Irep78_5 | 1 . . . . .
_cons | -28.2563 6.600582 -4.28 0.000 -41.19321 -15.3194
------------------------------------------------------------------------------
(Outcome foreign==Domestic is the comparison group)
.
Hope this helps,
Scott
*
* 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/