if (FALSE) {
# load the toy dataset
data( soy )
# run gwas
fit1 = gwas(y[w], Z[w,], pop[w])
# adjust variances
fit2 = CorrectBeavis( fit1 )
# Compare before and after correction
plot( fit1, h2=TRUE, col=8, pch=20) # display QTL h2
plot( fit2, h2=TRUE, add=TRUE, pch=20, type='o') # adjusted QTL h2
legend('topleft',pch=16,col=c(8,1),c('Before correction','After Beavis correction'))
}
Run the code above in your browser using DataLab