# Correlation of change in expression with response variable

I have paired gene expression data before and after a treatment, as well as an ordinal response variable with 3 levels for each sample after treatment. I am interested in the correlation of the (change in expression of 30 genes before and after) with the (response variable), as well as the significance of this correlation. What is the best tool/test to do this? Can it be done in limma?

• For each study unit (gene?) you have 2 X's (before & after), but only 1 Y, is that right? Do you have before & after response data? Is there any nesting in your data (eg, genes w/i subjects)? – gung - Reinstate Monica Nov 19 '14 at 19:12
• Correct 2 Xs and 1Y. The response (Y) is whether the subject responded to the drug, so it is based on both before and after measurements (ie the response is the magnitude of change), but I do not have access to the before and after, only the level of change. Hope that answers your questions. – user2379487 Nov 19 '14 at 19:16
• & the level of change is ordinal w/ 3 levels? Are the gene expressions nested w/i subjects? – gung - Reinstate Monica Nov 19 '14 at 19:18
• Yes level of change is ordinal with 3 levels. I do not understand the second question. The gene expression is measured on a continuous scale and measurement of each gene is independent of the other genes (they were measured on a microarray). – user2379487 Nov 19 '14 at 19:23
• Do you have microarray / gene expression data from >1 person / mouse? – gung - Reinstate Monica Nov 19 '14 at 19:27

Since your question is: "correlation of the (change in expression of 30 genes before and after) with the (response variable)", one way could be linear modelling with following code in R:

lm(resp1_3~(ge_post_pre_diff), data=mydata)


where resp1_3 is response variable and ge_post_pre_diff is difference of gene expressions (post-pre).

Also why not simple correlation:

cor.test(resp1_3, ge_post_pre_diff, method='spearman')


A scatterplot and boxplot between these 2 variables could also give some insight.

You could post the results of these for further suggestions from others.

• Sure that would work. And then I could adjust the p values for FDR. Simple correlation will not work because one variable is ordinal. I suppose I could use Spearman's rho. – user2379487 Nov 20 '14 at 2:38