ComBat: Error when including numerical covariates in model (numCovs)
0
0
Entering edit mode
@jordan-ramsey-6340
Last seen 9.6 years ago
Hi there, I've been working with the ComBat function in the SVA package and I've found that there seems to be a problem when trying to include numerical covariates in the model. I consistently get the error: Error in t(design) %*% design : requires numeric/complex matrix/vector arguments For example, if I run: model = model.matrix(~as.factor(Sex) + as.numeric(Age)) ComBat_dat = ComBat(gene_express, batch = BatchNums, mod = model, numCovs = 3, prior.plots = TRUE) This produces: Found 26 batches Found 1 categorical covariate(s) Found 1 continuous covariate(s) Standardizing Data across genes Error in t(design) %*% design : requires numeric/complex matrix/vector arguments However, when I use a model that only includes factors, I don't get any errors. Any ideas on what is going wrong here? Any help would be appreciated. Thanks, -- Jordan Ramsey [[alternative HTML version deleted]]
sva sva • 1.1k views
ADD COMMENT

Login before adding your answer.

Traffic: 921 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6