How to set mod0 in sva analysis
Entering edit mode
hank9cao • 0
Last seen 5 months ago

Dear all,

I was using sva to detect the hidden batch effects and remove them using linear regression. I felt confused to set mod and mod0 matrix properly in our application, any form of guidance was appreciated.

Setting 1

Suppose I have the covariates i.e. age and gender. According to the tutorial [1], it seems I have to set mod and mod0 matrix as:

mod = model.matrix(~Diagnosis+age+gender, data=metaExp)
mod0 = model.matrix(~age+gender+1, data=metaExp)
#Then the sva algorithm was performed:
SVAsol = sva(dat=t(X), mod=mod, mod0=mod0,

However, in this way, I found the hidden variables were still significantly correlated to age and gender, where I suppose there should be no correlations.

Setting 2

Alternatively, one of my colleagues suggest to set mod0 matrix as

mod0 = model.matrix(~+1, data=metaExp)

In this way, I do found no correlations between the hidden variables and the known covariates.

Could anyone let me know the appropriate setting of mod and mod0 matrix? Also, could you comment on the difference and influence of these two settings?


Regards, Hank

sva • 137 views
Entering edit mode
Robert Castelo ★ 2.7k
Last seen 4 weeks ago
Barcelona/Universitat Pompeu Fabra

I'd say setting 1 but you should remove the term +1 in the call that creates mod0. You can also check out the answer by Jeff Leek, the author of SVA, to a nearly identical question here posted some years ago.




Login before adding your answer.

Traffic: 551 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6