Variable of interest in combat correction
2
0
Entering edit mode
ch_el ▴ 10
@ch_el-22279
Last seen 2.7 years ago
Spain

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!

sva combat • 1.1k views
0
Entering edit mode
@james-w-macdonald-5106
Last seen 2 days ago
United States

The very next sentence in the vignette is

In this case there are no other adjustment variables so we simply fit an intercept term.

0
Entering edit mode
ch_el ▴ 10
@ch_el-22279
Last seen 2.7 years ago
Spain

Thank you for your answer! So in this example where the correction is applied, cancer doesn't continue to be a variable of interest and this is why it is not included?

Maybe I am understanding wrong the variable of interest vs adjustment variable?

0
Entering edit mode

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.

0
Entering edit mode

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

0
Entering edit mode

You don't seem to actually understand it though. The block quote from above was

In this case there are no other adjustment variables so we simply fit an intercept term.

Which says nothing about a variable of interest, right? And immediately below that section is this

 pValuesComBat = f.pvalue(combat_edata,mod,mod0)


Where mod and mod0 are used to compute the F-statistics and associated p-values for the variable of interest, as those two models were created like this:

mod = model.matrix(~as.factor(cancer), data=pheno)
mod0 = model.matrix(~1,data=pheno)


Which is where the variable of interest comes into the picture.