limma posterior variance - revisited
1
0
Entering edit mode
Naomi Altman ★ 6.0k
@naomi-altman-380
Last seen 3.6 years ago
United States
An HTML attachment was scrubbed... URL: https://www.stat.math.ethz.ch/pipermail/bioconductor/attachments/ 20040608/a9e532df/attachment.html
• 1.5k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia
At 06:43 AM 9/06/2004, Naomi Altman wrote: >The problem remains, but I have added a few lines of code that were >missing in the original posting. > >I have just run limma and am getting p-values after eBayes that are >smaller than the p-values before, leading to 100% of my genes being >declared significant at any value of FDR you care to use. It seems very surprising to get 100% of genes significant, but nothing in the output that you give below suggests that anything is wrong. It all seems as it should be. You should tend to get smaller p-values after eBayes than before because the degrees of freedom increase, but not uniformly so because many of the residual standard deviations also increase. >The design is a 1-way ANOVA with 6 treatments and 2 reps/treatment (which >I know is not great but ...) > >I thought that the denominator adjustment would make the posterior >sigma^2 > unadjusted MSE, but this is not the case. Empirical Bayes methods, like all shrinkage methods, shrink estimators towards a common value. This means that some values will go up, and some will go down. The help page says that eBayes() "uses an empirical Bayes method to shrink the gene-wise sample variances towards a common value". What is happening is that the precisions (the inverse sample variances) are being set to their posterior means. You can see the complete, pretty simple, formula by following the URL for the reference given on the help page. Gordon > Here are the commands I used to fit the model and do the ebayes > adjustment. > >design=model.matrix(~-1+factor(c(1,1,2,2,3,3,4,4,5,5,6,6))) >colnames(design)=c("trt1","trt2","trt3","trt4","trt5","trt6") > >fitRMA=lmFit(RMAdata,design) > >contrast.matrix > > c1 c2 c3 c4 c5 >trt1 1 1 1 1 1 >trt2 -1 1 1 1 1 >trt3 0 -2 1 1 1 >trt4 0 0 -3 1 1 >trt5 0 0 0 -5 1 >trt6 0 0 0 0 -5 > >fitCont=contrasts.fit(fitRMA,contrast.matrix) >fitAdj=eBayes(fitCont) > >ls.print(lsfit(fitRMA$sigma^2,fitAdj$s2.post)) >Residual Standard Error=0 >R-Square=1 >F-statistic (df=1, 22744)=1.632754e+35 >p-value=0 > > Estimate Std.Err t-value Pr(>|t|) >Intercept 0.0093 0 1.026963e+17 0 >X 0.5628 0 4.040735e+17 0 > >mean(fitAdj$s2.post) >[1] 0.02991697 > >mean(fitRMA$sigma^2) >[1] 0.03656270 > >fitAdj$s2.prior >[1] 0.02136298 > > >Naomi S. Altman 814-865-3791 (voice) >Associate Professor >Bioinformatics Consulting Center >Dept. of Statistics 814-863-7114 (fax) >Penn State University 814-865-1348 (Statistics) >University Park, PA 16802-2111
ADD COMMENT
0
Entering edit mode
Excuse me if I missed something here, but should not > >contrast.matrix > > c1 c2 c3 c4 c5 >trt1 1 1 1 1 1 >trt2 -1 1 1 1 1 >trt3 0 -2 1 1 1 >trt4 0 0 -3 1 1 >trt5 0 0 0 -5 1 >trt6 0 0 0 0 -5 (Note '-5' in c4) Be contrast.matrix c1 c2 c3 c4 c5 trt1 1 1 1 1 1 trt2 -1 1 1 1 1 trt3 0 -2 1 1 1 trt4 0 0 -3 1 1 trt5 0 0 0 -4 1 trt6 0 0 0 0 -5 Is this merely a typo in your email or is this the source of the problem? Chuck On Wed, 9 Jun 2004, Gordon Smyth wrote: > At 06:43 AM 9/06/2004, Naomi Altman wrote: > >The problem remains, but I have added a few lines of code that were > >missing in the original posting. > > > >I have just run limma and am getting p-values after eBayes that are > >smaller than the p-values before, leading to 100% of my genes being > >declared significant at any value of FDR you care to use. > > It seems very surprising to get 100% of genes significant, but nothing in > the output that you give below suggests that anything is wrong. It all > seems as it should be. You should tend to get smaller p-values after eBayes > than before because the degrees of freedom increase, but not uniformly so > because many of the residual standard deviations also increase. > > >The design is a 1-way ANOVA with 6 treatments and 2 reps/treatment (which > >I know is not great but ...) > > > >I thought that the denominator adjustment would make the posterior > >sigma^2 > unadjusted MSE, but this is not the case. > > Empirical Bayes methods, like all shrinkage methods, shrink estimators > towards a common value. This means that some values will go up, and some > will go down. The help page says that eBayes() "uses an empirical Bayes > method to shrink the gene-wise sample variances towards a common > value". What is happening is that the precisions (the inverse sample > variances) are being set to their posterior means. You can see the > complete, pretty simple, formula by following the URL for the reference > given on the help page. > > Gordon > > > Here are the commands I used to fit the model and do the ebayes > > adjustment. > > > >design=model.matrix(~-1+factor(c(1,1,2,2,3,3,4,4,5,5,6,6))) > >colnames(design)=c("trt1","trt2","trt3","trt4","trt5","trt6") > > > >fitRMA=lmFit(RMAdata,design) > > > >contrast.matrix > > > > c1 c2 c3 c4 c5 > >trt1 1 1 1 1 1 > >trt2 -1 1 1 1 1 > >trt3 0 -2 1 1 1 > >trt4 0 0 -3 1 1 > >trt5 0 0 0 -5 1 > >trt6 0 0 0 0 -5 > > > >fitCont=contrasts.fit(fitRMA,contrast.matrix) > >fitAdj=eBayes(fitCont) > > > >ls.print(lsfit(fitRMA$sigma^2,fitAdj$s2.post)) > >Residual Standard Error=0 > >R-Square=1 > >F-statistic (df=1, 22744)=1.632754e+35 > >p-value=0 > > > > Estimate Std.Err t-value Pr(>|t|) > >Intercept 0.0093 0 1.026963e+17 0 > >X 0.5628 0 4.040735e+17 0 > > > >mean(fitAdj$s2.post) > >[1] 0.02991697 > > > >mean(fitRMA$sigma^2) > >[1] 0.03656270 > > > >fitAdj$s2.prior > >[1] 0.02136298 > > > > > >Naomi S. Altman 814-865-3791 (voice) > >Associate Professor > >Bioinformatics Consulting Center > >Dept. of Statistics 814-863-7114 (fax) > >Penn State University 814-865-1348 (Statistics) > >University Park, PA 16802-2111 > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > Charles C. Berry (858) 534-2098 Dept of Family/Preventive Medicine E mailto:cberry@tajo.ucsd.edu UC San Diego http://hacuna.ucsd.edu/members/ccb.html La Jolla, San Diego 92093-0717
ADD REPLY
0
Entering edit mode
Thanks, Chuck. I noticed this after my first set of e-mails and fixed it. It was the source of the original problem (variance inflation instead of variance stabilization) but not the 2nd problem - 97% of the genes appear to differentially express (FDR=.01) and that percentage is HIGHER than the percentage of genes with ebayes or ordinary p-value less than .01. --Naomi At 06:14 PM 6/9/2004 +0000, you wrote: >Excuse me if I missed something here, but should not > > > > >contrast.matrix > > > > c1 c2 c3 c4 c5 > >trt1 1 1 1 1 1 > >trt2 -1 1 1 1 1 > >trt3 0 -2 1 1 1 > >trt4 0 0 -3 1 1 > >trt5 0 0 0 -5 1 > >trt6 0 0 0 0 -5 > >(Note '-5' in c4) > >Be > >contrast.matrix > > c1 c2 c3 c4 c5 >trt1 1 1 1 1 1 >trt2 -1 1 1 1 1 >trt3 0 -2 1 1 1 >trt4 0 0 -3 1 1 >trt5 0 0 0 -4 1 >trt6 0 0 0 0 -5 > >Is this merely a typo in your email or is this the source of the >problem? > >Chuck > >On Wed, 9 Jun 2004, Gordon Smyth wrote: > > > At 06:43 AM 9/06/2004, Naomi Altman wrote: > > >The problem remains, but I have added a few lines of code that were > > >missing in the original posting. > > > > > >I have just run limma and am getting p-values after eBayes that are > > >smaller than the p-values before, leading to 100% of my genes being > > >declared significant at any value of FDR you care to use. > > > > It seems very surprising to get 100% of genes significant, but nothing in > > the output that you give below suggests that anything is wrong. It all > > seems as it should be. You should tend to get smaller p-values after > eBayes > > than before because the degrees of freedom increase, but not uniformly so > > because many of the residual standard deviations also increase. > > > > >The design is a 1-way ANOVA with 6 treatments and 2 reps/treatment (which > > >I know is not great but ...) > > > > > >I thought that the denominator adjustment would make the posterior > > >sigma^2 > unadjusted MSE, but this is not the case. > > > > Empirical Bayes methods, like all shrinkage methods, shrink estimators > > towards a common value. This means that some values will go up, and some > > will go down. The help page says that eBayes() "uses an empirical Bayes > > method to shrink the gene-wise sample variances towards a common > > value". What is happening is that the precisions (the inverse sample > > variances) are being set to their posterior means. You can see the > > complete, pretty simple, formula by following the URL for the reference > > given on the help page. > > > > Gordon > > > > > Here are the commands I used to fit the model and do the ebayes > > > adjustment. > > > > > >design=model.matrix(~-1+factor(c(1,1,2,2,3,3,4,4,5,5,6,6))) > > >colnames(design)=c("trt1","trt2","trt3","trt4","trt5","trt6") > > > > > >fitRMA=lmFit(RMAdata,design) > > > > > >contrast.matrix > > > > > > c1 c2 c3 c4 c5 > > >trt1 1 1 1 1 1 > > >trt2 -1 1 1 1 1 > > >trt3 0 -2 1 1 1 > > >trt4 0 0 -3 1 1 > > >trt5 0 0 0 -5 1 > > >trt6 0 0 0 0 -5 > > > > > >fitCont=contrasts.fit(fitRMA,contrast.matrix) > > >fitAdj=eBayes(fitCont) > > > > > >ls.print(lsfit(fitRMA$sigma^2,fitAdj$s2.post)) > > >Residual Standard Error=0 > > >R-Square=1 > > >F-statistic (df=1, 22744)=1.632754e+35 > > >p-value=0 > > > > > > Estimate Std.Err t-value Pr(>|t|) > > >Intercept 0.0093 0 1.026963e+17 0 > > >X 0.5628 0 4.040735e+17 0 > > > > > >mean(fitAdj$s2.post) > > >[1] 0.02991697 > > > > > >mean(fitRMA$sigma^2) > > >[1] 0.03656270 > > > > > >fitAdj$s2.prior > > >[1] 0.02136298 > > > > > > > > >Naomi S. Altman 814-865-3791 (voice) > > >Associate Professor > > >Bioinformatics Consulting Center > > >Dept. of Statistics 814-863-7114 (fax) > > >Penn State University 814-865-1348 (Statistics) > > >University Park, PA 16802-2111 > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@stat.math.ethz.ch > > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor > > > >Charles C. Berry (858) 534-2098 > Dept of Family/Preventive Medicine >E mailto:cberry@tajo.ucsd.edu UC San Diego >http://hacuna.ucsd.edu/members/ccb.html La Jolla, San Diego 92093-0717 > > Naomi S. Altman 814-865-3791 (voice) Associate Professor Bioinformatics Consulting Center Dept. of Statistics 814-863-7114 (fax) Penn State University 814-865-1348 (Statistics) University Park, PA 16802-2111
ADD REPLY

Login before adding your answer.

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