edgeR Quasi-likelihood with tagwise dispersion?
1
0
Entering edit mode
@ryan-c-thompson-5618
Last seen 9 months ago
Scripps Research, La Jolla, CA
Hi Gordon, I was looking in the devel code for edgeR and I noticed this new check in glmQLFTest: > if(!is.null(disptype)) if(disptype=="tagwise") stop("glmfit should be computed using trended dispersions, not tagwise") which refuses to run the quasi-likelihood F-test on a fit for tagwise dispersion. Could you elaborate on this? Does glmQLFTest implement its own different kind of tagwise behavior that is different from that of estimateGLMTagwiseDisp? What would happen if I ran glmQLFTest after estimateGLMTagwiseDisp (using the release version, which does not disallow it)?Would the results be statistically meaningful? I have been doing this sometimes because I assumed that glmQLFTest was supposed to be a "drop-in" replacement for glmLRT, using all the same dispersions and such, due to this quote from the glmQLFTest help text in the current release of edgeR: > [glmQLFTest] behaves the same as ?glmLRT? except that it replaces likelihood ratio tests with quasi-likelihood F-tests for coefficients in the linear model. So, what is the correct usage of glmQLFTest with the estimate*Disp family, and has this changed between the current release and devel versions of edgeR? Thanks, -Ryan Thompson
edgeR edgeR • 1.9k views
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 55 minutes ago
WEHI, Melbourne, Australia
Dear Ryan, Yes, glmQLFTest() can be substituted for glmLRT() in an edgeR analysis pipeline, but it assumes that trended not tagwise dispersion has been estimated. This is explained in the published paper Lund et al (2012). There has been no detailed description of the usage of glmQLFTest() in the edgeR document so far, but there will be before the next release in a few weeks' time. Yes, glmQLFtest() does its own tagwise dispersion moderation. This is the reason for the function. glmQLFTest() actually does its own trending as well, so that it is quite robust to the NB dispersions that it gets as input. The help page says: "[glmQLFTest] calls the limma function squeezeVar to conduct empirical Bayes smoothing of the genewise multiplicative dispersions." I don't think that you will get meaningfull results from inputing tagwise dispersions into glmQLTest(), i.e., it doesn't make sense to re-shrink values that are already shrunk. Because of the possible misunderstanding, glmQLFTest() now has a new calling sequence, so that it can stand alone from glmFit(). This permits the function to ensure that it gets the correct NB dispersion estimates. Best wishes Gordon --------------------------------------------- Professor Gordon K Smyth, Bioinformatics Division, Walter and Eliza Hall Institute of Medical Research, 1G Royal Parade, Parkville, Vic 3052, Australia. http://www.statsci.org/smyth On Mon, 18 Mar 2013, Ryan C. Thompson wrote: > Hi Gordon, > > I was looking in the devel code for edgeR and I noticed this new check > in glmQLFTest: > >> if(!is.null(disptype)) if(disptype=="tagwise") stop("glmfit should be > computed using trended dispersions, not tagwise") > > which refuses to run the quasi-likelihood F-test on a fit for tagwise > dispersion. Could you elaborate on this? Does glmQLFTest implement its > own different kind of tagwise behavior that is different from that of > estimateGLMTagwiseDisp? > > What would happen if I ran glmQLFTest after estimateGLMTagwiseDisp > (using the release version, which does not disallow it)? Would the > results be statistically meaningful? I have been doing this sometimes > because I assumed that glmQLFTest was supposed to be a "drop-in" > replacement for glmLRT, using all the same dispersions and such, due to > this quote from the glmQLFTest help text in the current release of > edgeR: > >> [glmQLFTest] behaves the same as ?glmLRT? except that it replaces > likelihood ratio tests with quasi-likelihood F-tests for coefficients in > the linear model. > > So, what is the correct usage of glmQLFTest with the estimate*Disp > family, and has this changed between the current release and devel > versions of edgeR? > > Thanks, > -Ryan Thompson > ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:5}}
ADD COMMENT
0
Entering edit mode
Ok, so the proper calling sequence would, in general, be something like this? dge <- DGEList(...) dge <- calcNormFactors(dge) dge <- estimateGLMCommonDisp(dge, design) dge <- estimateGLMTrendedDisp(dge, design) qlft <- glmQLFTest(dge, design, coef=...) On 03/18/2013 07:42 PM, Gordon K Smyth wrote: > Dear Ryan, > > Yes, glmQLFTest() can be substituted for glmLRT() in an edgeR analysis > pipeline, but it assumes that trended not tagwise dispersion has been > estimated. This is explained in the published paper Lund et al (2012). > > There has been no detailed description of the usage of glmQLFTest() in > the edgeR document so far, but there will be before the next release > in a few weeks' time. > > Yes, glmQLFtest() does its own tagwise dispersion moderation. This is > the reason for the function. glmQLFTest() actually does its own > trending as well, so that it is quite robust to the NB dispersions > that it gets as input. The help page says: > > "[glmQLFTest] calls the limma function squeezeVar to conduct empirical > Bayes smoothing of the genewise multiplicative dispersions." > > I don't think that you will get meaningfull results from inputing > tagwise dispersions into glmQLTest(), i.e., it doesn't make sense to > re-shrink values that are already shrunk. > > Because of the possible misunderstanding, glmQLFTest() now has a new > calling sequence, so that it can stand alone from glmFit(). This > permits the function to ensure that it gets the correct NB dispersion > estimates. > > Best wishes > Gordon > > --------------------------------------------- > Professor Gordon K Smyth, > Bioinformatics Division, > Walter and Eliza Hall Institute of Medical Research, > 1G Royal Parade, Parkville, Vic 3052, Australia. > http://www.statsci.org/smyth > > On Mon, 18 Mar 2013, Ryan C. Thompson wrote: > >> Hi Gordon, >> >> I was looking in the devel code for edgeR and I noticed this new >> check in glmQLFTest: >> >>> if(!is.null(disptype)) if(disptype=="tagwise") stop("glmfit should be >> computed using trended dispersions, not tagwise") >> >> which refuses to run the quasi-likelihood F-test on a fit for tagwise >> dispersion. Could you elaborate on this? Does glmQLFTest implement >> its own different kind of tagwise behavior that is different from >> that of estimateGLMTagwiseDisp? >> >> What would happen if I ran glmQLFTest after estimateGLMTagwiseDisp >> (using the release version, which does not disallow it)? Would the >> results be statistically meaningful? I have been doing this sometimes >> because I assumed that glmQLFTest was supposed to be a "drop-in" >> replacement for glmLRT, using all the same dispersions and such, due >> to this quote from the glmQLFTest help text in the current release of >> edgeR: >> >>> [glmQLFTest] behaves the same as ?glmLRT? except that it replaces >> likelihood ratio tests with quasi-likelihood F-tests for coefficients >> in the linear model. >> >> So, what is the correct usage of glmQLFTest with the estimate*Disp >> family, and has this changed between the current release and devel >> versions of edgeR? >> >> Thanks, >> -Ryan Thompson >> > > ______________________________________________________________________ > The information in this email is confidential and inte...{{dropped:6}}
ADD REPLY
0
Entering edit mode
Yes. Or in the devel version dge <- estimateDisp(dge, design ...) is an alternative route to NB dispersion estimation, and could subsitute for the two disp calls below. Gordon On Mon, 18 Mar 2013, Ryan C. Thompson wrote: > Ok, so the proper calling sequence would, in general, be something like this? > > dge <- DGEList(...) > dge <- calcNormFactors(dge) > dge <- estimateGLMCommonDisp(dge, design) > dge <- estimateGLMTrendedDisp(dge, design) > qlft <- glmQLFTest(dge, design, coef=...) > > > > > On 03/18/2013 07:42 PM, Gordon K Smyth wrote: >> Dear Ryan, >> >> Yes, glmQLFTest() can be substituted for glmLRT() in an edgeR analysis >> pipeline, but it assumes that trended not tagwise dispersion has been >> estimated. This is explained in the published paper Lund et al (2012). >> >> There has been no detailed description of the usage of glmQLFTest() in the >> edgeR document so far, but there will be before the next release in a few >> weeks' time. >> >> Yes, glmQLFtest() does its own tagwise dispersion moderation. This is the >> reason for the function. glmQLFTest() actually does its own trending as >> well, so that it is quite robust to the NB dispersions that it gets as >> input. The help page says: >> >> "[glmQLFTest] calls the limma function squeezeVar to conduct empirical >> Bayes smoothing of the genewise multiplicative dispersions." >> >> I don't think that you will get meaningfull results from inputing tagwise >> dispersions into glmQLTest(), i.e., it doesn't make sense to re- shrink >> values that are already shrunk. >> >> Because of the possible misunderstanding, glmQLFTest() now has a new >> calling sequence, so that it can stand alone from glmFit(). This permits >> the function to ensure that it gets the correct NB dispersion estimates. >> >> Best wishes >> Gordon >> >> --------------------------------------------- >> Professor Gordon K Smyth, >> Bioinformatics Division, >> Walter and Eliza Hall Institute of Medical Research, >> 1G Royal Parade, Parkville, Vic 3052, Australia. >> http://www.statsci.org/smyth >> >> On Mon, 18 Mar 2013, Ryan C. Thompson wrote: >> >>> Hi Gordon, >>> >>> I was looking in the devel code for edgeR and I noticed this new check >>> in glmQLFTest: >>> >>>> if(!is.null(disptype)) if(disptype=="tagwise") stop("glmfit should be >>> computed using trended dispersions, not tagwise") >>> >>> which refuses to run the quasi-likelihood F-test on a fit for tagwise >>> dispersion. Could you elaborate on this? Does glmQLFTest implement its >>> own different kind of tagwise behavior that is different from that of >>> estimateGLMTagwiseDisp? >>> >>> What would happen if I ran glmQLFTest after estimateGLMTagwiseDisp >>> (using the release version, which does not disallow it)? Would the >>> results be statistically meaningful? I have been doing this sometimes >>> because I assumed that glmQLFTest was supposed to be a "drop-in" >>> replacement for glmLRT, using all the same dispersions and such, due >>> to this quote from the glmQLFTest help text in the current release of >>> edgeR: >>> >>>> [glmQLFTest] behaves the same as ?glmLRT? except that it replaces >>> likelihood ratio tests with quasi-likelihood F-tests for coefficients >>> in the linear model. >>> >>> So, what is the correct usage of glmQLFTest with the estimate*Disp >>> family, and has this changed between the current release and devel >>> versions of edgeR? >>> >>> Thanks, >>> -Ryan Thompson ______________________________________________________________________ The information in this email is confidential and intend...{{dropped:5}}
ADD REPLY

Login before adding your answer.

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