# Using clean ge03d2 data
require(GenABEL.data)
data(ge03d2.clean)
# take only a small piece for speed
ge03d2.clean <- ge03d2.clean[1:200,]
# estimate genomic kinship
gkin <- ibs(ge03d2.clean[,sample(autosomal(ge03d2.clean),1000)], w="freq")
# perform polygenic analysis
h2ht <- polygenic(height ~ sex + age, kin=gkin, ge03d2.clean)
h2ht$est
# compute mmscore stats
mm <- mmscore(h2ht, data=ge03d2.clean)
# compute grammar-gc
grGc <- grammar(h2ht, data=ge03d2.clean, method="gc")
# compute grammar-gamma
grGamma <- grammar(h2ht, data=ge03d2.clean, method="gamma")
# compare lambdas
lambda(mm)
estlambda(mm[,"chi2.1df"])
lambda(grGamma)
estlambda(grGamma[,"chi2.1df"])
lambda(grGc)
estlambda(grGc[,"chi2.1df"])
# compare top results
summary(mm)
summary(grGamma)
summary(grGc)
Run the code above in your browser using DataLab