adjusting for confounding factors in Spearman correlation?
Entering edit mode
2.9 years ago
diogo.moraes ▴ 10


I have a large heterogeneous dataset (n~1000) with gene expression and weight. The age ranges vary from 18-80 years old, there are both men and women. I would like to find genes that correlate with weight regardless of sex and age. Because there are differences in weight between men, women and some age ranges, I have decided to stratify the samples, run Spearman's correlation using sapply on each group and look for common significant genes. However, this also reduces sample size of each test. Is there any other way to deal with these confounding factors besides stratification?

Best, Diogo

sapply spearman r • 987 views
Entering edit mode
2.9 years ago
Papyrus ★ 2.9k

I understand you are specifically interested in Spearman correlation? If not, you could always do a linear model in limma-voom or DESeq2, etc. to test the effect of the gene expression ~ weight relationship, while including sex and age in the model.

Aside from that, for any analysis for which you can't adjust for covariates in a model, you can always regress-out the effect of sex and age from your data prior to the analysis, using for example the removeBatchEffect function from limma (if your data is count based, you can transform it to log-scale through DESeq2, for example, prior to regressing-out covariates, so that their distribution is more normal/homoscedastic).


Login before adding your answer.

Traffic: 1782 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