# NOT RUN {
data(SNPs)
# first, we create an object of class 'setupSNP'
datSNP<-setupSNP(SNPs,6:40,sep="")
# case-control study, crude analysis
association(casco~snp10001, data=datSNP)
# case-control study, adjusted by sex and arterial blood pressure
association(casco~sex+snp10001+blood.pre, data=datSNP)
# quantitative trait, crude analysis
association(log(protein)~snp10001,data=datSNP)
# quantitative trait, adjusted by sex
association(log(protein)~snp10001+sex,data=datSNP)
#
# Interaction analysis
#
# Interaction SNP and factor
association(log(protein)~snp10001*sex+blood.pre, data=datSNP,
model="codominant")
# Interaction SNP and SNP (codominant and codominant)
association(log(protein)~snp10001*factor(snp10002)+blood.pre,
data=datSNP, model="codominant")
# Interaction SNP and SNP (dominant and recessive)
association(log(protein)~snp10001*factor(recessive(snp100019))+blood.pre,
data=datSNP, model="dominant")
# }
Run the code above in your browser using DataLab