Young Hee Rho wrote:
I have encountered many "trend tests" of linearity concerning odds ratios (OR) of a categorical variable.
For example, I am modeling a logistic model Y=b1x1 + b2x2 + b3x3 +b4. x2 is a 5-level categorical variable, for example the level of drinking (while Y is the presence/absence of hyperuricemia). When the results are displayed, the ORs of the 5 levels are shown and the linear trend is shown as a single p value. The individual ORs may not have significance, however the overall trend does.
_______________________________________________________________________
To do a test for linear trend, you may use the log likelihood ration test!
First you run the logistic regression with the categorical variable expanded by 'xi' (getting 4 estimates relative to the reference category of b2) and store the log likelihood in 'A':
Model 1
xi:logistic y b1 i.b2 b3 b4
estimate store A
then you repeat the regression without the 'xi' expansion of the categorical variable (Now you only one estimate of b2, which is the linear effect of b2).
Model 2
xi:logistic y b1 b2 b3 b4
(Note: the 'i.' in front of b2 is removed).
You then simply need to se if the reduced model (model 2) is as good as your previous model (Model 1). You do that using the likelihood ration test:
lrtest A
To conclude that you have a linear trend the p-value of the lrtest needs to be insignificant (Model 2 is not significantly worse than Model 1) AND the estimate for b2 (the linear effect per category in model 2) must be significant!
Kim Lyngby Mikkelsen
Stilling
Seniorforsker
Uddannelse
Cand.med. Ph.D.
Telefon
39165467
Email
klm@ami.dk
-----Oprindelig meddelelse-----
Fra: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] På vegne af Rho YH
Sendt: 23. maj 2006 05:23
Til: statalist@hsphsun2.harvard.edu
Emne: RE: RE: Re: st: Linear Trend Tests of ORs
I have just found out that the tabodds command may meet what I wanted - linear trend of ORs,
however making multivariate adjustments is not easy (I tried and it gave no results after adjusting
for >2 or 3 variables.) Is there any "immediate command" by just inputing the OR (and CI, if needed)
and the independent variable category and produces a p value?
> ---- Original Message ----
> From : Rho YH [mania1@korea.ac.kr]
> To : statalist@hsphsun2.harvard.edu
> Date : 2006년 5월 23일(화) 09:43:23
> Subject : RE: Re: st: Linear Trend Tests of ORs
>
>
>Hmm.. It looks like the aformentioned Cochrane-Armitage Test, however I'll check it out.
>Thanks.
>> ---- Original Message ----
>> From : Suzy [scott_788@wowway.com]
>> To : statalist@hsphsun2.harvard.edu
>> Date : 2006년 5월 22일(월) 21:24:22
>> Subject : Re: st: Linear Trend Tests of ORs
>>
>>
>>Perhaps Szklo and Nieto's book can help: Epidemiology. Beyond the
>>Basics, discusses test for trend (dose reponse) in Appendix B (pp 459-462).
>>
>>Formula is from Mantel:
>>
>>Mantel N. Chi square tests with one degree of freedom: etensions of the
>>Manetel-Haenszel procedure. J Am Stat Assoc. 1963;58: 690-700.
>>
>>Hope this helps.
>>Suzy
>>
>>Young Hee Rho wrote:
>>
>>>I have encountered many "trend tests" of linearity concerning odds ratios (OR) of a
>>>categorical variable.
>>>For example, I am modeling a logistic model Y=b1x1 + b2x2 + b3x3 +b4. x2 is a 5-level
>>>categorical variable, for example the level of drinking (while Y is the presence/absence of
>>>hyperuricemia). When the results are displayed, the ORs of the 5 levels are shown and
>>>the linear trend is shown as a single p value. The individual ORs may not have significance,
>>>however the overall trend does. It is said that it was tested through regressing the median of
>>>the levels on the ORs. Otherwise in other cases, there are many trend tests of linearity
>>>expresed in many papers, however, the actual method is not explained in detail. (It does not
>>>apear to come from polynomial contrasts of ANOVA nor from categorical trend tests
>>>(Cochrane-Armitage) since the arformentioned test is from values coming from
>>>one categorical variable having several estimates. How is this done and how much methods
>>>exsist on this topic? Are there any useful references?
>>>** For those who got twice this article, I sent this article again since it did not seem to register on
>>>Statalist. Many apologies if there was a duplicate delivery.
>>>
>>
>>
>>*
>>* 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/
>>
>>
>>
>
>
>
*
* 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/