Home >
Community >
Adjusting phenotypes by regressing out covariates
Upvote
31
Downvote
+ Biochemistry
+ Gwas
+ Statistics
Posted by
Alan Wood
Adjusting phenotypes by regressing out covariates
Instead of the "observed phenotype", it's asking for a "corrected phenotype", which is the residuals from pheno ~ covariates. In R, one would get that as follows:
fit = lm(phenotype ~ covariates, data)
corrected_phenotype = resid(fit)
Of course covariates is just a place hold for something like age + gender or something along those lines.
Instead of the "observed phenotype", it's asking for a "corrected phenotype", which is the residuals from pheno ~ covariates. In R, one would get that as follows:
fit = lm(phenotype ~ covariates, data)corrected_phenotype = resid(fit)
Of course covariates is just a place hold for something like age + gender or something along those lines.
Instead of the "observed phenotype", it's asking for a "corrected phenotype", which is the residuals from
pheno ~ covariates. In R, one would get that as follows:Of course
covariatesis just a place hold for something likeage + genderor something along those lines.Instead of the "observed phenotype", it's asking for a "corrected phenotype", which is the residuals from
pheno ~ covariates. In R, one would get that as follows:Of course
covariatesis just a place hold for something likeage + genderor something along those lines.More
VOTE
VOTE
VOTE