data(SNPs)
datSNP<-setupSNP(SNPs,6:40,sep="")
ansAll<-WGassociation(protein~1,data=datSNP,model="all")
# In that case the formula is not required. You can also write:
# ansAll<-WGassociation(protein,data=datSNP,model="all")
#only codominant and log-additive
ansCoAd<-WGassociation(protein~1,data=datSNP,model=c("co","log-add"))
#for printing p values
print(ansAll)
print(ansCoAd)
#for obtaining a matrix with the p palues
pvalAll<-pvalues(ansAll)
pvalCoAd<-pvalues(ansCoAd)
# when all models are fitted and we are interested in obtaining
# p values for different genetic models
# codominant model
pvalCod<-codominant(ansAll)
# recessive model
pvalRec<-recessive(ansAll)
# and the same for additive, dominant or overdominant
#summary
summary(ansAll)
#for a detailed report
WGstats(ansAll)
#for plotting the p values
plot(ansAll)
Run the code above in your browser using DataLab