Dear All,
I have a question regarding combat. I am unsure about what to include into the model matrix (mod).
Do I have to insert only those variables that I want to correct for or also the response variable?
If I call the help function for Combat, I get the information :
ComBat(dat, batch, mod, numCovs = NULL, par.prior = TRUE,
prior.plots = FALSE)
mod |
Model matrix for outcome of interest and other covariates besides batch |
But in the sva package, http://www.bioconductor.org/packages/release/bioc/vignettes/sva/inst/doc/sva.pdf
under 6. Applying the ComBat function to adjust for known batches
you can read:
“Just as with sva, we then need to create a model matrix for the adjustment variables, but do not
include the variable of interest. Note that you do not include batch in creating this model matrix - it
will be included later in ComBat function. In this case there are no other adjustment variables so we
simply fit an intercept term.
> modcombat = model.matrix(~1, data=pheno)”
It would be great if you could help me with that problem.
Thank you very much, kindest regards, Maren