question: fit2$F.p.value
2
0
Entering edit mode
@toni-ann-mistretta-1059
Last seen 11.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060809/ 13740106/attachment.pl
• 577 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 16 hours ago
United States
Hi Scott, Mistretta, Toni-Ann wrote: > > > Hello, > > > I have fit a group means parameterization to my three samples: A, B, > C (fit1). I used contrasts.fit to fit my contrasts of interest: B-A, > and C-A (fit2). My question: does fit2$F.p.value apply to the > differences between the three samples A, B, and C (similar to a > one-way ANOVA) or does it apply to the differences between the two > contrasts B-A and C-A? I really need someone to clarify this point > for me before I go on and select differentially expressed genes. In > my case treatments B and C are very similar so this point is almost > mute. However, I will be analyzing data sets in the future where > treatments B and C are very different making my question very > important. Well, I was working under the assumption that the F-statistic was the 'usual' F-stat (MSR/MSE), but apparently I was mistaken. The help page for the MArrayLM class states: 'F.stat': 'numeric' vector giving moderated F-statistics for testing all contrasts equal to zero 'F.p.value': 'numeric' vector giving p-value corresponding to 'F.stat' That's not perfectly clear (all contrasts could be 'all possible contrasts', yes?). So a test: > library(fibroEset) > data(fibroEset) > library(limma) > design <- model.matrix(~0+pData(fibroEset)[,2]) > contrast <- matrix(c(-1,1,0)) > fit <- lmFit(log2(exprs(fibroEset)), design) > fit2 <- contrasts.fit(fit, contrast) > fit2 <- eBayes(fit2) > contrast <- matrix(c(-1,1,0,-1,0,1,0,-1,1), nc=3) > fit3 <- contrasts.fit(fit, contrast) > fit3 <- eBayes(fit3) > cbind(fit2$F,fit3$F)[1:10,] [,1] [,2] [1,] 15.118961041 7.7401961 [2,] 11.105009661 19.8022284 [3,] 0.007904608 1.4477756 [4,] 1.748568559 1.3576871 [5,] 0.187640831 4.1238891 [6,] 1.633728790 0.8174006 [7,] 2.116625209 1.7426943 [8,] 0.208801377 0.5223336 [9,] 9.813763553 10.9888647 [10,] 0.010995645 0.8344381 Looks like 'all contrasts' means 'all specified contrasts'. HTH, Jim > > Scott Ochsner Baylor College of Medicine One Baylor Plaza Houston, > TX. 77030 > > > thanks, > > S > > > Sent for S. Ochsner by TAM > > [[alternative HTML version deleted]] > > _______________________________________________ Bioconductor mailing > list Bioconductor at stat.math.ethz.ch > 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 Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 4 hours ago
WEHI, Melbourne, Australia
Hi James, Thanks for handingly this query. In the limma documentation, the term "coefficient" is consistently used to refer to the coefficients multiplying the columns of the design matrix, whereas "contrast" is consistently used to refer to the columns specified by contrasts.fit(). In other words, the coefficients are the columns in the lmFit() fit while the contrasts are the columns given to eBayes(). When the documentation says that the F-test corresponds to "all contrasts", it means all the contrasts in the above sense. In other words, the F-test always corresponds to the columns in the same fitted model object. It is an overall test statistic computed from the set of t-statistics in the same object. This has to be so, because there is no other way in limma to extract F-tests for particular subjects of contrasts. If someone as familiar with limma as you found this unclear, then it must be unclear, so I've revised the help for ?eBayes to try to make it more transparent. The description of the output component F now reads "numeric vector of moderated F-statistics for testing all contrasts defined by the columns of \code{fit} simultaneously equal to zero" The details section says "The empirical Bayes moderated t-statistics test each individual contrast equal to zero. The moderated F-statistics test whether all the contrasts are zero for each probe (row). For each probe, the F-statistic is an overall test computed from the set of t-statistics for that probe. This is exactly analogous the relationship between t-tests and F-statistics in conventional anova, except that the residual mean squares and residual degrees of freedom have been moderated between probes." Best wishes Gordon >Date: Wed, 09 Aug 2006 15:49:37 -0400 >From: "James W. MacDonald" <jmacdon at="" med.umich.edu=""> >Subject: Re: [BioC] question: fit2$F.p.value >To: "Mistretta, Toni-Ann" <toniannm at="" bcm.tmc.edu=""> >Cc: bioconductor at stat.math.ethz.ch >Message-ID: <44DA3C51.7030407 at med.umich.edu> >Content-Type: text/plain; charset="utf-8"; format=flowed > >Hi Scott, > >Mistretta, Toni-Ann wrote: > > > > > > Hello, > > > > > > I have fit a group means parameterization to my three samples: A, B, > > C (fit1). I used contrasts.fit to fit my contrasts of interest: B-A, > > and C-A (fit2). My question: does fit2$F.p.value apply to the > > differences between the three samples A, B, and C (similar to a > > one-way ANOVA) or does it apply to the differences between the two > > contrasts B-A and C-A? I really need someone to clarify this point > > for me before I go on and select differentially expressed genes. In > > my case treatments B and C are very similar so this point is almost > > mute. However, I will be analyzing data sets in the future where > > treatments B and C are very different making my question very > > important. > >Well, I was working under the assumption that the F-statistic was the >'usual' F-stat (MSR/MSE), but apparently I was mistaken. The help page >for the MArrayLM class states: > >'F.stat': 'numeric' vector giving moderated F-statistics for > testing all contrasts equal to zero > >'F.p.value': 'numeric' vector giving p-value corresponding to > 'F.stat' > >That's not perfectly clear (all contrasts could be 'all possible >contrasts', yes?). So a test: > > > library(fibroEset) > > data(fibroEset) > > library(limma) > > design <- model.matrix(~0+pData(fibroEset)[,2]) > > contrast <- matrix(c(-1,1,0)) > > fit <- lmFit(log2(exprs(fibroEset)), design) > > fit2 <- contrasts.fit(fit, contrast) > > fit2 <- eBayes(fit2) > > contrast <- matrix(c(-1,1,0,-1,0,1,0,-1,1), nc=3) > > fit3 <- contrasts.fit(fit, contrast) > > fit3 <- eBayes(fit3) > > cbind(fit2$F,fit3$F)[1:10,] > [,1] [,2] > [1,] 15.118961041 7.7401961 > [2,] 11.105009661 19.8022284 > [3,] 0.007904608 1.4477756 > [4,] 1.748568559 1.3576871 > [5,] 0.187640831 4.1238891 > [6,] 1.633728790 0.8174006 > [7,] 2.116625209 1.7426943 > [8,] 0.208801377 0.5223336 > [9,] 9.813763553 10.9888647 >[10,] 0.010995645 0.8344381 > >Looks like 'all contrasts' means 'all specified contrasts'. > >HTH, > >Jim > > > > > > > Scott Ochsner Baylor College of Medicine One Baylor Plaza Houston, > > TX. 77030 > > > > > > thanks, > > > > S > > > > > > Sent for S. Ochsner by TAM > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ Bioconductor mailing > > list Bioconductor at stat.math.ethz.ch > > 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 >Affymetrix and cDNA Microarray Core >University of Michigan Cancer Center >1500 E. Medical Center Drive >7410 CCGC >Ann Arbor MI 48109 >734-647-5623
ADD COMMENT
0
Entering edit mode
Hi Gordon, Thanks for the confirmation and the documentation changes. After responding to the original email, I realized that it should have been obvious anyway - how could something like decideTests(fit, method = "nestedF") ever work if the F test were MSR/MSE? Best, Jim Gordon Smyth wrote: > Hi James, > > Thanks for handingly this query. In the limma documentation, the term > "coefficient" is consistently used to refer to the coefficients > multiplying the columns of the design matrix, whereas "contrast" is > consistently used to refer to the columns specified by contrasts.fit(). > In other words, the coefficients are the columns in the lmFit() fit > while the contrasts are the columns given to eBayes(). When the > documentation says that the F-test corresponds to "all contrasts", it > means all the contrasts in the above sense. In other words, the F-test > always corresponds to the columns in the same fitted model object. It is > an overall test statistic computed from the set of t-statistics in the > same object. This has to be so, because there is no other way in limma > to extract F-tests for particular subjects of contrasts. > > If someone as familiar with limma as you found this unclear, then it > must be unclear, so I've revised the help for ?eBayes to try to make it > more transparent. The description of the output component F now reads > > "numeric vector of moderated F-statistics for testing all contrasts > defined by the columns of \code{fit} simultaneously equal to zero" > > The details section says > > "The empirical Bayes moderated t-statistics test each individual > contrast equal to zero. The moderated F-statistics test whether all the > contrasts are zero for each probe (row). For each probe, the F-statistic > is an overall test computed from the set of t-statistics for that probe. > This is exactly analogous the relationship between t-tests and > F-statistics in conventional anova, except that the residual mean > squares and residual degrees of freedom have been moderated between > probes." > > Best wishes > Gordon > >> Date: Wed, 09 Aug 2006 15:49:37 -0400 >> From: "James W. MacDonald" <jmacdon at="" med.umich.edu=""> >> Subject: Re: [BioC] question: fit2$F.p.value >> To: "Mistretta, Toni-Ann" <toniannm at="" bcm.tmc.edu=""> >> Cc: bioconductor at stat.math.ethz.ch >> Message-ID: <44DA3C51.7030407 at med.umich.edu> >> Content-Type: text/plain; charset="utf-8"; format=flowed >> >> Hi Scott, >> >> Mistretta, Toni-Ann wrote: >> > >> > >> > Hello, >> > >> > >> > I have fit a group means parameterization to my three samples: A, B, >> > C (fit1). I used contrasts.fit to fit my contrasts of interest: B-A, >> > and C-A (fit2). My question: does fit2$F.p.value apply to the >> > differences between the three samples A, B, and C (similar to a >> > one-way ANOVA) or does it apply to the differences between the two >> > contrasts B-A and C-A? I really need someone to clarify this point >> > for me before I go on and select differentially expressed genes. In >> > my case treatments B and C are very similar so this point is almost >> > mute. However, I will be analyzing data sets in the future where >> > treatments B and C are very different making my question very >> > important. >> >> Well, I was working under the assumption that the F-statistic was the >> 'usual' F-stat (MSR/MSE), but apparently I was mistaken. The help page >> for the MArrayLM class states: >> >> 'F.stat': 'numeric' vector giving moderated F-statistics for >> testing all contrasts equal to zero >> >> 'F.p.value': 'numeric' vector giving p-value corresponding to >> 'F.stat' >> >> That's not perfectly clear (all contrasts could be 'all possible >> contrasts', yes?). So a test: >> >> > library(fibroEset) >> > data(fibroEset) >> > library(limma) >> > design <- model.matrix(~0+pData(fibroEset)[,2]) >> > contrast <- matrix(c(-1,1,0)) >> > fit <- lmFit(log2(exprs(fibroEset)), design) >> > fit2 <- contrasts.fit(fit, contrast) >> > fit2 <- eBayes(fit2) >> > contrast <- matrix(c(-1,1,0,-1,0,1,0,-1,1), nc=3) >> > fit3 <- contrasts.fit(fit, contrast) >> > fit3 <- eBayes(fit3) >> > cbind(fit2$F,fit3$F)[1:10,] >> [,1] [,2] >> [1,] 15.118961041 7.7401961 >> [2,] 11.105009661 19.8022284 >> [3,] 0.007904608 1.4477756 >> [4,] 1.748568559 1.3576871 >> [5,] 0.187640831 4.1238891 >> [6,] 1.633728790 0.8174006 >> [7,] 2.116625209 1.7426943 >> [8,] 0.208801377 0.5223336 >> [9,] 9.813763553 10.9888647 >> [10,] 0.010995645 0.8344381 >> >> Looks like 'all contrasts' means 'all specified contrasts'. >> >> HTH, >> >> Jim >> >> >> >> > >> > Scott Ochsner Baylor College of Medicine One Baylor Plaza Houston, >> > TX. 77030 >> > >> > >> > thanks, >> > >> > S >> > >> > >> > Sent for S. Ochsner by TAM >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ Bioconductor mailing >> > list Bioconductor at stat.math.ethz.ch >> > 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 >> Affymetrix and cDNA Microarray Core >> University of Michigan Cancer Center >> 1500 E. Medical Center Drive >> 7410 CCGC >> Ann Arbor MI 48109 >> 734-647-5623 > > -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD REPLY

Login before adding your answer.

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