This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Gwas - Case/Control In R?

Hi,

I wish to run a very simple logistic regression in R on a case/control GWAS set.

I don't want to use an R package just yet as I prefer to know exactly what is going on.

I am thinking that I should do this using the glm() function where:

model <- glm(phenotype~genotype)

My phenotype is simple binary case control data. My problem is I don't understand the use of family and link functions within the glm function.

Should the model be run as above or:

model <- glm(phenotype~genotype, family=binomial())

or

model <- glm(phenotype~genotype, family=binomial("logit"))

or perhaps none of the above?

Thanks.

r gwas

1 answer

Hey,

You should use:

 model <- glm(phen~genotype, family=binomial).

The logit link function is the default one so no need to specified it; though if you do, the result should be the same.

Log in to answer this question.