Hello! I have found some older posts considering whether or not to include the variable of interest while correcting with combat but they are as old as 6 years.
The current version of the sva tutorial says:
"Just as with sva, we then need to create a model matrix for the adjustment variables, including the variable of interest. Note that you do not include batch in creating this model matrix - it will be included later in the ComBat function."
But then I don't think the model actually includes the variable of interest which whould be cancer:
"modcombat = model.matrix(~1, data=pheno)".
Has this been cleared up somewhere?
Many thanks in advance!
Unless you are actually answering a question, please don't use the ADD ANSWER button (do note that there is a sentence immediately prior to that button explaining what you should actually do instead).
Adjustment variables (sometimes called nuisance variables) are those things that you think might affect your dependent variable, but are not themselves of interest. Things like sex or age or race or whatever. The variable of interest is, well, the variable you are interested in, which is cancer in that example.
I understand and this is why I thought that if the variable of interest should be included, then that specific example should be "modcombat = model.matrix(~as.factor(cancer), data=pheno)". That would be variable of interest included, no other adjustment variables, correct?
Thank you
You don't seem to actually understand it though. The block quote from above was
Which says nothing about a variable of interest, right? And immediately below that section is this
Where
mod
andmod0
are used to compute the F-statistics and associated p-values for the variable of interest, as those two models were created like this:Which is where the variable of interest comes into the picture.