Search
Question: mulitfactorial analysis, adjusting for quantitative covariates
0
gravatar for Guest User
4.4 years ago by
Guest User12k
Guest User12k 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) 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.
ADD COMMENTlink modified 4.4 years ago by James W. MacDonald46k • written 4.4 years ago by Guest User12k
0
gravatar for James W. MacDonald
4.4 years ago by
United States
James W. MacDonald46k wrote:
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 COMMENTlink written 4.4 years ago by James W. MacDonald46k
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 2.2.0
Traffic: 198 users visited in the last hour