limma and blocks
3
0
Entering edit mode
@thibaud-nissen-francoise-999
Last seen 10.2 years ago
Hi, I am analyzing an experiment using 32 Arabidopsis Affymetrix chips. It is basically a 2x2x4 design repeated twice using different biological replicates (the third replicate will be provided later). The plants within each biological replicate were grown at the same time, and in that sense are related and form a block. There are no technical replicates within each block. I am using limma. In the model I calculate separate coefficients for each of the 16 conditions. I then use contrasts matrices to evaluate contrasts of interest. I now would like to incorporate the block effect in my model in order to account for random variation in the growth conditions between the two biological replicates. I tried two models that give different results, but I am not sure any of them is correct: If the first biological replicate appears first in my design, and "design" is my design matrix for the 16 coefficients: Model 1: biorep <- c(rep(1,16),rep(2,16)) fit <- lmFit(mydata, design, block= biorep) fit <- eBayes(fit) ... Model 2: blockdiff <- c(rep(1,16),rep(-1,16)) blockdesign <- cbind(design, Block=blockdiff) fitblock <-lmFit(mydata, blockdesign) fitblock <- eBayes(fitblock) ... I would appreciate any tip that could put me in the right track! Thanks, Françoise [[alternative HTML version deleted]]
limma limma • 1.4k views
ADD COMMENT
0
Entering edit mode
Fangxin Hong ▴ 810
@fangxin-hong-912
Last seen 10.2 years ago
I haven't use the "block"option myself, but I believe those two models are different. Model 1 treats your block effect as random effect, and model 2 treats it as a fixed effect. If that is the case, your model 1 should fits the data better, as block usually treated as random effect with mean 0. Please indicate if I am wrong or anyone knows this issue better. Fx > Model 1: > > biorep <- c(rep(1,16),rep(2,16)) > > fit <- lmFit(mydata, design, block= biorep) > > fit <- eBayes(fit) > ... > > > > Model 2: > > blockdiff <- c(rep(1,16),rep(-1,16)) > > blockdesign <- cbind(design, Block=blockdiff) > > fitblock <-lmFit(mydata, blockdesign) > > fitblock <- eBayes(fitblock) > > ... > > > > I would appreciate any tip that could put me in the right track! > > > > Thanks, > > > > Fran?oise > > > > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > > -- Fangxin Hong, Ph.D. Plant Biology Laboratory The Salk Institute 10010 N. Torrey Pines Rd. La Jolla, CA 92037 E-mail: fhong@salk.edu
ADD COMMENT
0
Entering edit mode
Fangxin Hong ▴ 810
@fangxin-hong-912
Last seen 10.2 years ago
I think you can read the new limma User's Guide, section 9.4. should answer your questions. I am sorry that I did notice that you have only two blocks (growth condition), tht way maybe model 2 is better. Limma User's Guide, available from http://bioinf.wehi.edu.au/limma/usersguide.pdf Fx > Hi, > > > > I am analyzing an experiment using 32 Arabidopsis Affymetrix chips. It is > basically a 2x2x4 design repeated twice using different biological replicates (the third replicate will be provided later). The plants within > each biological replicate were grown at the same time, and in that sense are related and form a block. There are no technical replicates within each block. > > > > I am using limma. In the model I calculate separate coefficients for each > of the 16 conditions. I then use contrasts matrices to evaluate contrasts > of interest. > > > > I now would like to incorporate the block effect in my model in order to account for random variation in the growth conditions between the two biological replicates. > > > > I tried two models that give different results, but I am not sure any of them is correct: > > > > If the first biological replicate appears first in my design, and "design" > is my design matrix for the 16 coefficients: > > > > Model 1: > > biorep <- c(rep(1,16),rep(2,16)) > > fit <- lmFit(mydata, design, block= biorep) > > fit <- eBayes(fit) > > ... > > > > Model 2: > > blockdiff <- c(rep(1,16),rep(-1,16)) > > blockdesign <- cbind(design, Block=blockdiff) > > fitblock <-lmFit(mydata, blockdesign) > > fitblock <- eBayes(fitblock) > > ... > > > > I would appreciate any tip that could put me in the right track! > > > > Thanks, > > > > Fran?oise > > > > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > > -- Fangxin Hong, Ph.D. Plant Biology Laboratory The Salk Institute 10010 N. Torrey Pines Rd. La Jolla, CA 92037 E-mail: fhong@salk.edu
ADD COMMENT
0
Entering edit mode
@thibaud-nissen-francoise-999
Last seen 10.2 years ago
Fangxin, Thank you very much for your answer. I derived my models from the technical replicates examples in the Limma manual. I am glad you can confirm that model 1 corresponds to a random effect model and model 2 to a fixed effect model. You seem to hint that with two levels for block a fixed-effects model would be more appropriate. Is this correct? For a given factor, is a fixed-effects model better if you have fewer levels? Thanks, Fran?oise -----Original Message----- From: Fangxin Hong [mailto:fhong@salk.edu] Sent: Friday, November 05, 2004 6:17 PM To: Thibaud-Nissen, Francoise Cc: bioconductor@stat.math.ethz.ch Subject: Re: [BioC] limma and blocks I think you can read the new limma User's Guide, section 9.4. should answer your questions. I am sorry that I did notice that you have only two blocks (growth condition), tht way maybe model 2 is better. Limma User's Guide, available from http://bioinf.wehi.edu.au/limma/usersguide.pdf Fx > Hi, > > > > I am analyzing an experiment using 32 Arabidopsis Affymetrix chips. It is > basically a 2x2x4 design repeated twice using different biological replicates (the third replicate will be provided later). The plants within > each biological replicate were grown at the same time, and in that sense are related and form a block. There are no technical replicates within each block. > > > > I am using limma. In the model I calculate separate coefficients for each > of the 16 conditions. I then use contrasts matrices to evaluate contrasts > of interest. > > > > I now would like to incorporate the block effect in my model in order to account for random variation in the growth conditions between the two biological replicates. > > > > I tried two models that give different results, but I am not sure any of them is correct: > > > > If the first biological replicate appears first in my design, and "design" > is my design matrix for the 16 coefficients: > > > > Model 1: > > biorep <- c(rep(1,16),rep(2,16)) > > fit <- lmFit(mydata, design, block= biorep) > > fit <- eBayes(fit) > > ... > Model 2: > > blockdiff <- c(rep(1,16),rep(-1,16)) > > blockdesign <- cbind(design, Block=blockdiff) > > fitblock <-lmFit(mydata, blockdesign) > > fitblock <- eBayes(fitblock) > > ... > > I would appreciate any tip that could put me in the right track! > > > > Thanks, > > > > Fran?oise >
ADD COMMENT
0
Entering edit mode
Fran?oise; I am glad that helps. Generally speaking, block effect is random from a distribution. But if you don't have enough blocks to estimate this distribution ( in the case of two levels within block), I do think that a fixed effect model is better, especially when you have many units within each block. Bests; Fangxin > Fangxin, > > Thank you very much for your answer. I derived my models from the > technical replicates examples in the Limma manual. I am glad you can > confirm that model 1 corresponds to a random effect model and model 2 to a > fixed effect model. You seem to hint that with two levels for block a > fixed-effects model would be more appropriate. Is this correct? For a > given factor, is a fixed-effects model better if you have fewer levels? > > Thanks, > > Fran?oise > > -----Original Message----- > From: Fangxin Hong [mailto:fhong@salk.edu] > Sent: Friday, November 05, 2004 6:17 PM > To: Thibaud-Nissen, Francoise > Cc: bioconductor@stat.math.ethz.ch > Subject: Re: [BioC] limma and blocks > > I think you can read the new limma User's Guide, section 9.4. should > answer your questions. I am sorry that I did notice that you have only two > blocks (growth condition), tht way maybe model 2 is better. > > Limma User's Guide, available from > http://bioinf.wehi.edu.au/limma/usersguide.pdf > > Fx > >> Hi, >> >> >> >> I am analyzing an experiment using 32 Arabidopsis Affymetrix chips. It > is >> basically a 2x2x4 design repeated twice using different biological > replicates (the third replicate will be provided later). The plants > within >> each biological replicate were grown at the same time, and in that sense > are related and form a block. There are no technical replicates within > each block. >> >> >> >> I am using limma. In the model I calculate separate coefficients for > each >> of the 16 conditions. I then use contrasts matrices to evaluate > contrasts >> of interest. >> >> >> >> I now would like to incorporate the block effect in my model in order to > account for random variation in the growth conditions between the two > biological replicates. >> >> >> >> I tried two models that give different results, but I am not sure any of > them is correct: >> >> >> >> If the first biological replicate appears first in my design, and > "design" >> is my design matrix for the 16 coefficients: >> >> >> >> Model 1: >> >> biorep <- c(rep(1,16),rep(2,16)) >> >> fit <- lmFit(mydata, design, block= biorep) >> >> fit <- eBayes(fit) >> >> ... > >> Model 2: >> >> blockdiff <- c(rep(1,16),rep(-1,16)) >> >> blockdesign <- cbind(design, Block=blockdiff) >> >> fitblock <-lmFit(mydata, blockdesign) >> >> fitblock <- eBayes(fitblock) >> >> ... >> >> I would appreciate any tip that could put me in the right track! >> >> >> >> Thanks, >> >> >> >> Fran?oise >> > > > -- Fangxin Hong, Ph.D. Plant Biology Laboratory The Salk Institute 10010 N. Torrey Pines Rd. La Jolla, CA 92037 E-mail: fhong@salk.edu
ADD REPLY

Login before adding your answer.

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