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

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

 From "Meems, LMG" To "'statalist@hsphsun2.harvard.edu'" Subject 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 14:15:48 +0000

```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/
```