mulitfactorial analysis, adjusting for quantitative covariates
1
0
Entering edit mode
Guest User ★ 13k
@guest-user-4897
Last seen 9.6 years ago
Hi! I would like to use Limma to compare gene expression between two treatment groups (PO vs C). In this analysis I need to adjust for differences in a quantitative covariate (age) between samples. Is the following setup appropriate for this analysis? Do I accurately adjust for age in the final analysis? Ingrid -- output of sessionInfo(): eset<-readExpressionSet("eset.txt","target.txt",header=TRUE) GROUP <- factor(target$GROUP, levels=c("C","PO")) AGE <- factor(target$AGE) design <- model.matrix(~0+GROUP+AGE) colnames(design) <- c("C","PO") fit <- lmFit(eset,design) cont.matrix <- makeContrasts(CvsPO=C-PO,levels=design) fit2 <- contrasts.fit(fit, cont.matrix) fit2 <- eBayes(fit2) topTable(fit2, n=100, coef="CvsPO", adjust="BH") -- Sent via the guest posting facility at bioconductor.org.
limma limma • 3.7k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 12 minutes ago
United States
Hi Ingrid, On Monday, December 02, 2013 4:12:20 AM, Ingrid Dahlman [guest] wrote: > > Hi! > I would like to use Limma to compare gene expression between two treatment groups (PO vs C). In this analysis I need to adjust for differences in a quantitative covariate (age) between samples. Is the following setup appropriate for this analysis? Do I accurately adjust for age in the final analysis? > Ingrid > > -- output of sessionInfo(): > > eset<-readExpressionSet("eset.txt","target.txt",header=TRUE) > GROUP <- factor(target$GROUP, levels=c("C","PO")) > AGE <- factor(target$AGE) I don't think this is what you want to do. A factor is by definition something that is unordered and not quantitative. I would think instead you want to fit age as a continuous covariate. Something like design <- model.matrix(~ 0 + GROUP + AGE, target) colnames(design) <- gsub("target", "", colnames(design)) Should get you what you want. Best, Jim > design <- model.matrix(~0+GROUP+AGE) > colnames(design) <- c("C","PO") > fit <- lmFit(eset,design) > cont.matrix <- makeContrasts(CvsPO=C-PO,levels=design) > fit2 <- contrasts.fit(fit, cont.matrix) > fit2 <- eBayes(fit2) > topTable(fit2, n=100, coef="CvsPO", adjust="BH") > > -- > Sent via the guest posting facility at bioconductor.org. > > _______________________________________________ > 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

Login before adding your answer.

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