Entering edit mode
Jordan Ramsey
▴
20
@jordan-ramsey-6340
Last seen 10.3 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]]