Gwas - Case/Control In R?
1
4
Entering edit mode
13.4 years ago

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 • 5.2k views
ADD COMMENT
5
Entering edit mode
13.4 years ago
Adrian Cortes ▴ 550

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.

ADD COMMENT

Login before adding your answer.

Traffic: 2350 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6