Statalist


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

Re: st: how to adjust for covariates?


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: how to adjust for covariates?
Date   Mon, 11 Jan 2010 05:14:04 -0800 (PST)

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



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