Question: Proper set up to test interaction of continuous covariate and factor levels (limma)
0
gravatar for Moritz Hess
5.9 years ago by
Moritz Hess60
Moritz Hess60 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 ? 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 • 1.0k views
ADD COMMENTlink modified 5.9 years ago by James W. MacDonald50k • written 5.9 years ago by Moritz Hess60
Answer: Proper set up to test interaction of continuous covariate and factor levels (lim
0
gravatar for James W. MacDonald
5.9 years ago by
United States
James W. MacDonald50k wrote:
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 COMMENTlink written 5.9 years ago by James W. MacDonald50k
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 REPLYlink written 5.9 years ago by Moritz Hess60
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 140 users visited in the last hour