Statalist The Stata Listserver


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

SV: Re: SV: RE: Re: st: Linear Trend Tests of ORs


From   "Kim Lyngby Mikkelsen (KLM)" <klm@ami.dk>
To   <statalist@hsphsun2.harvard.edu>
Subject   SV: Re: SV: RE: Re: st: Linear Trend Tests of ORs
Date   Wed, 24 May 2006 13:38:46 +0200

The riklihood ratio test is a standard method to test nested models against each other (see 'lrtest' in the Stata manual or 'help lrtest' inside Stata).

What is left, is to see that the 2 models - the unrestricted model (with the 'xi:' expansion of the categorical variable) versus the restricted model (with the linear effect per category) is what you want to compare, to be a 'test of a linear effect'.

To see that, you will have to think of a re-parameterization of your unrestricted model:
You have 5 categories in your variable, and using the xi: expansion, the first category becomes the reference category and you get the odds ratio between each of the other 4 categories versus the reference category.

Instead you could have parameterized your model to get an estimate of each of the 4 steps between successive ordered categories. That is, you estimate 4 independent estimates of the effect of a one step increase in category. If you try to parameterize your model this way, you will find that you will get exactly the same log likelihood, as in fact the two models are identical.

If the 4 category specific estimates are:
	cat2 
	cat3 
	cat4 
	cat5

The re-parameterization is like this:
step1_2 = cat2
step2_3 = cat3 - cat2
step3_4 = cat4 - cat3
step4_5 = cat5 - cat4


Now it should be fairly simple to see, that estimating one estimate of the 'effect per category' in the restricted model (the linear effect) instead of 4 individual estimates of this effect (that is, if the effects could be said to be the same between each successive category) is exactly what you want for a 'test of linear effect'!


Regards Kim

---------------------
sum = 


Kim Lyngby Mikkelsen
Stilling  
Seniorforsker  
Uddannelse  
Cand.med. Ph.D.  
Telefon  
39165467  
Email  
klm@ami.dk  




Forskningsprojekter


-----Oprindelig meddelelse-----
Fra: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] På vegne af Rho YH
Sendt: 24. maj 2006 05:24
Til: statalist@hsphsun2.harvard.edu
Emne: RE: Re: SV: RE: Re: st: Linear Trend Tests of ORs

Thanks for the help.
I got a faxxed copy of Clayton's book. It is p252-253, to be exact (for other people), and the publish
date is 1993 (to avoid futher confusion). Unfortunately, it is too simple. I'll have to check to book itself
later for what other is in there. The other book (Selvin) has a new version (2004), and I'll have to
check that out later when I can go to the library.
By the way, is the tabodds -adjust- option suitable only for categorical variables?
> ---- Original Message ----
> From : Tim Wade [wadetj@gmail.com]
> To : statalist@hsphsun2.harvard.edu
> Date : 2006년 5월 24일(수) 01:04:32
> Subject : Re: SV: RE: Re: st: Linear Trend Tests of ORs
>
>
>Rho,
>Procedures similar to those described by Kim are described in Clayton
>and Hills "Statistical Models for Epidemiology" 1996, page 252 and
>Selvin "Statistical Analysis of Epidemiological Data" 2nd Edition,
>page 228
>
>Hope this helps, Tim
>
>On 5/23/06, Rho YH wrote:
>> Yes, I have heard about this type of test, but didn't mention it because I couldn't readily
>> understand it.
>> Can I know the source of this test (which means, references) and any actual papers that used
this
>> test?
>> Still, any other recommendations meanwhile are welcome.
>> > ---- Original Message ----
>> > From : "Kim Lyngby Mikkelsen (KLM)" [klm@ami.dk]
>> > To : statalist@hsphsun2.harvard.edu
>> > Date : 2006년 5월 23일(화) 19:32:21
>> > Subject : SV: RE: Re: st: Linear Trend Tests of ORs
>> >
>> >
>> >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/
>> >
>> >
>> >
>>
>>
>
>*
>* 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/



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