How to deal with covariates in GWAS analysis
This article shows you how to deal with covariates in GWAS analysis, which is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
1. Background
In regression analysis, sometimes we need to know the regression coefficient of each factor at each level, so we need to transform the factor into a virtual variable. There is model.matrix in R language for conversion, but only one factor can be converted. Here we use R packet useful, which can support multiple factors to convert at the same time.
two。 Sample data Herd