--- On Mon, 11/1/10, [email protected] wrote:
> I'm doing a SNP analysis using the xi:logistic function.
> To exclude possible confounder, I'm adjusting my calculations for
> different variables, e.g. sex and ethnics.
> My study population consists of 4 different ethnicities, coded as
> 1 2 3 4. sex is coded 1 2. SNPs are coded 1 2 3 (e.g. CC/CT/TT).
> I don't understand the following:
>
> When I calculate:
>
> xi:logistic i.snp sex ethnics
>
> i get different results to
>
> xi:logistic i.snp sex i.ethnics
>
> Why is that, and what is the correct way to adjust for ethnics, using
> i.ethnics or just ethnics?
Neither is correct. The problem is your dependent variable: it is
a categorical varialbe with more than 2 categories, so -logistic- will
not work the way you think it does. You should use -mlogit- instead.
The default for Stata is that all variables are continuous unless you
say otherwise, so if you add ethnic it treats that variable als a
continuous variable, which is obviously not what you want, so use
i.ethnic instead.
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/