You presumably have your genotype variable coded as a factor; check by saying:
> str( gentp ) (or whatever your variable is called) The default in glm is to use the first level as reference. But you can reorder the levels usuing the relevel() command, so you just do: > glm( y ~ relevel(gentp,3) + ...., familily=binomial ) You can explore furtehr by trying: > str( relevel(gento,3) ) In Epi there is slightly more versatile function called Relevel, which also allows > str( Relevel(gento,c(3,2)) ) which in some sence would be more natural. Best regards, Bendix _________________________________________ Bendix Carstensen Senior Statistician Steno Diabetes Center A/S Niels Steensens Vej 2-4 DK-2820 Gentofte Denmark +45 44 43 87 38 (direct) +45 30 75 87 38 (mobile) b...@steno.dk www.biostat.ku.dk/~bxc www.steno.dk -----Original Message----- From: r-sig-epi-boun...@stat.math.ethz.ch [mailto:r-sig-epi-boun...@stat.math.ethz.ch] On Behalf Of ????????? ?????????? Sent: 28. oktober 2010 09:57 To: r-sig-epi@stat.math.ethz.ch Subject: [R-sig-Epi] Reference group in logistic regression analysis To someone who could help me: I am a PhD student, working in the Novosibirsk University, Russia. I am now using glm() function to do logistic regression analysis. I cannot understand how the chosen reference group. For example, for the three genotypes of GG, GC, CC I want to be risk assessed in relation to the genotype CC, but the program selects the genotype GG. How do I change the reference group? Thanks for your time. Best wishes, Ekaterina Kudryavtseva PhD student, Department of Molecular Biology Novosibirsk University Tel: +7-923-185-82-47 _______________________________________________ R-sig-Epi@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-epi _______________________________________________ R-sig-Epi@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-epi