Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Is this the right code if I want to compare group 1 vs group 4 in a logistic regression model?


From   Alfonso Sanchez-Penalver <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Is this the right code if I want to compare group 1 vs group 4 in a logistic regression model?
Date   Wed, 4 Dec 2013 09:36:08 -0500

Hi Laura,

You mention you break up a continuous variable into four categories and then use a logit regression. I believe in this case ordered logit would be more appropriate, since the categories follow the natural order of the continuous variable.

Having said that I am a bit confused about your main question. You say "I want to compare the lowest group (0) with the highest group (3) and the effects on age and sex". I thought the groups were the response variable, because the logit model would allow you to calculate effects on belonging to a group or another. Did you mean you want to know what the difference in the effects that age and sex would have on the probability of belonging to the lowest group and the probability of belonging to the highest group? If so, or something similar, you can use margins after the ordered logit regression to estimate the effects on the probabilities of belonging to each of the groups of any variable of interest and then take the difference for the groups you want.

Sorry if I misunderstood your message, please let me know if my interpretation is what you were after.

Best,

Alfonso Sanchez-Penalver

> On Dec 4, 2013, at 9:15 AM, "Meems, LMG" <[email protected]> wrote:
> 
> Hello Statalisters,
> 
> After a couple of days filled with STATA and database work, I really need a check if what I'm doing is right..
> 
> At the moment I'm looking at the predicted effect from a continuous variable (Y) on a couple of other parameters.
> I decided to split the continuous variable in 4 groups: thereby following it's clinical reference values (e.g. sufficient, insufficient etc.).
> 
> After this step I wanted to fit this variable in a regression model, using logistic regression (as I thought that dividing it in groups turned the continuous variable into a categorical one..). So far, so good..
> 
> However, let's say I now want to compare the lowest group (0) with the highest group (3) and the effects on age and sex.
> The code I used to do this is:
> Char (Y) [omit] 3
> Xi: logit i.Y + age sex
> 
> This resulted in coefficients for age and sex, but also resulted in 2 ommitted values, namely group 1 and 2. With the comment that group 1 and 2 !=0 and predicted failure perfectly.
> 
> So, this result made me doubting about the code. Is this the right code to use and what exactely do these 2 ommitted values mean? Is it a result from the code I made (that would be the good scenario) or is it something wrong and should I correct for it (or even correct the code)?
> 
> Looking forward to the answer and thank you!!
> 
> Laura
> 
> =================================
> 
> Laura M.G. Meems, MD/PhD student
> University Medical Center Groningen (UMCG)
> Dept. of Experimental Cardiology, AB43
> P.O. Box 30.001
> 9700 RB Groningen, The Netherlands
> P +31 50 361 5054 | F +31 50 361 1347 |
> 
> ________________________________
> De inhoud van dit bericht is vertrouwelijk en alleen bestemd voor de geadresseerde(n). Anderen dan de geadresseerde(n) mogen geen gebruik maken van dit bericht, het niet openbaar maken of op enige wijze verspreiden of vermenigvuldigen. Het UMCG kan niet aansprakelijk gesteld worden voor een incomplete aankomst of vertraging van dit verzonden bericht.
> 
> The contents of this message are confidential and only intended for the eyes of the addressee(s). Others than the addressee(s) are not allowed to use this message, to make it public or to distribute or multiply this message in any way. The UMCG cannot be held responsible for incomplete reception or delay of this transferred message.
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

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


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index