Proper set up to test interaction of continuous covariate and factor levels (limma)
1
0
Entering edit mode
Moritz Hess ▴ 60
@moritz-hess-5851
Last seen 10.2 years ago
Hi, I am investigating the global gene expression response to a continuous environmental covariate in two groups of individuals using limma. I am interested in genes whose expression is: A) correlated with the covariate B) differentially correlated with the covariate in the two groups of individuals (Interaction of Group and Covariate) In order to be able to set up the proper contrasts I split the Covariate in two Vectors where one Vector contains only the samples with the lowest level of the covariate e.g. CovBase = c(0,0,0,3,0,3,0,0) and where the other vector contains all the samples with higher levels of the covariate e.g. Cov = c(34,2,5,0,5,0,2,34) and set up a design matrix without intercept: ~ Group + CovBase + Cov The contrasts I am testing are specified as follows: Effect of Covariate: Cov-CovBase Interaction of Group and Covariate: (GroupA-GroupB) - (Cov-CovBase) Does this procedure makes sense ? Thank you very much in advance Moritz -- *Moritz Heß PhD Candidate * *Research associate Forest Research Institute of Baden Württemberg (FVA) Wonnhalde 4 79100 Freiburg (Germany) phone +49 761 4018 301* [[alternative HTML version deleted]]
limma limma • 1.6k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 22 hours ago
United States
Hi Moritz, On 8/20/2013 2:30 PM, Moritz Hess wrote: > Hi, > I am investigating the global gene expression response to a continuous > environmental covariate in two groups of individuals using limma. > I am interested in genes whose expression is: > A) correlated with the covariate > B) differentially correlated with the covariate in the two groups of > individuals (Interaction of Group and Covariate) > > In order to be able to set up the proper contrasts I split the Covariate in > two Vectors where one Vector contains only the samples with the lowest > level of the covariate > e.g. CovBase = c(0,0,0,3,0,3,0,0) > and where the other vector contains all the samples with higher levels of > the covariate > e.g. Cov = c(34,2,5,0,5,0,2,34) > and set up a design matrix without intercept: > > ~ Group + CovBase + Cov > > > The contrasts I am testing are specified as follows: > Effect of Covariate: Cov-CovBase > Interaction of Group and Covariate: (GroupA-GroupB) - (Cov-CovBase) > > Does this procedure makes sense ? It doesn't make sense to me. In the first place the formula you use will create an intercept. Secondly, if you want the covariate to be continuous, then why are you splitting it like that? And why do you think values of 3 are lower than values of 2? If I were trying to do what you say you are doing, then I would just do cov <- c(34,2,5,3,5,3,2,34) group <- factor(whateveryourgroupsare) design <- model.matrix(~cov*group) Best, Jim > > Thank you very much in advance > > Moritz > > > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- James W. MacDonald, M.S. Biostatistician University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
ADD COMMENT
0
Entering edit mode
Hi James, thanks for your reply! My intention to use the above mentioned (although improper as you mentioned) method was to be able to form clear tests. I assumed that when I am testing for genes responding to the covariate e.g. significant "cov" I am testing against the Baseline in the reference group (the group that has been assigned as reference by limma or lm). But I want to test against the baseline in all groups. Basically I wanted to adapt the procedure that has been proposed for factoral designs in the limma userguide (Section 8.7). I now realize that testing for significant coefficients for cov and interaction of group only seems to be a good choice for me. However I was a little puzzled by the fact that the effect size for cov would be only the effect size / slope within GroupA, which I somehow confused with a signifcant nonzero slope of the covariate exclusively in GroupA. Best, Moritz 2013/8/21 James W. MacDonald <jmacdon@uw.edu> > Hi Moritz, > > > On 8/20/2013 2:30 PM, Moritz Hess wrote: > >> Hi, >> I am investigating the global gene expression response to a continuous >> environmental covariate in two groups of individuals using limma. >> I am interested in genes whose expression is: >> A) correlated with the covariate >> B) differentially correlated with the covariate in the two groups of >> individuals (Interaction of Group and Covariate) >> >> In order to be able to set up the proper contrasts I split the Covariate >> in >> two Vectors where one Vector contains only the samples with the lowest >> level of the covariate >> e.g. CovBase = c(0,0,0,3,0,3,0,0) >> and where the other vector contains all the samples with higher levels of >> the covariate >> e.g. Cov = c(34,2,5,0,5,0,2,34) >> and set up a design matrix without intercept: >> >> ~ Group + CovBase + Cov >> >> >> The contrasts I am testing are specified as follows: >> Effect of Covariate: Cov-CovBase >> Interaction of Group and Covariate: (GroupA-GroupB) - (Cov-CovBase) >> >> Does this procedure makes sense ? >> > > It doesn't make sense to me. In the first place the formula you use will > create an intercept. Secondly, if you want the covariate to be continuous, > then why are you splitting it like that? And why do you think values of 3 > are lower than values of 2? > > If I were trying to do what you say you are doing, then I would just do > > cov <- c(34,2,5,3,5,3,2,34) > group <- factor(whateveryourgroupsare) > > design <- model.matrix(~cov*group) > > Best, > > Jim > > > >> Thank you very much in advance >> >> Moritz >> >> >> >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.ch="" mailman="" listinfo="" bioconductor=""> >> Search the archives: http://news.gmane.org/gmane.** >> science.biology.informatics.**conductor<http: news.gmane.org="" gmane="" .science.biology.informatics.conductor=""> >> > > -- > James W. MacDonald, M.S. > Biostatistician > University of Washington > Environmental and Occupational Health Sciences > 4225 Roosevelt Way NE, # 100 > Seattle WA 98105-6099 > > -- *Moritz Heß PhD Candidate * *Research associate Forest Research Institute of Baden Württemberg (FVA) Wonnhalde 4 79100 Freiburg (Germany) phone +49 761 4018 301* [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 555 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

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

Powered by the version 2.3.6