Entering edit mode
2.6 years ago
Curious_Gene
▴
10
Is it possible to add covariates such as age and sex as adjustment variables when building a model matrix for a paired subject dataset during surrogate variable analysis (SVA) and supervised normalization (SNM)? The below code throws an error, most likely because the age, sex, and subject IDs (since they are paired samples) become linearly correlated:
mod1 <- model.matrix(~age + sex + subjectID + condition,
data = colData)
mod0 <- model.matrix(~1, data = colData)
Appreciate any help!