edgeR: squeezeVar in EstimateDisp vs glmQLFit
3
0
Entering edit mode
@veroniquestorme-9384
Last seen 2.9 years ago
Belgium

Dear edgeR users or developers,

I am trying to understand the order of calculations in the latest QL workflow

Comparing the source code of the estimateDisp function with the glmQLFit, I came across the use of the squeezeVar function in both. In the estimateDisp function, first the trended dispersions are estimated, followed by a glmfit with the trended dispersions, and then squeezing the variance resulting in df.prior. From this, one can also retrieve the posterior variance, although it is not outputted at this point. This seems to be the same as the posterior variance (called the QL dispersion) outputted by the glmQLFit. Am I assuming this correct or am I missing something?

Thanks a lot in advance,

Veronique Storme

edger • 1.8k views
ADD COMMENT
2
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 15 hours ago
The city by the bay

The two squeezeVar calls are basically the same but have different intentions. The call in estimateDisp is intended to estimate the prior d.f. for EB shrinkage of the NB dispersions. The one in glmQLFit is intended for EB shrinkage of the QL dispersions (the shrunken tagwise NB dispersions are not used here). The calls are repeated for various logistical reasons in the QL workflow, despite doing the same thing. This is because glmQLFit could theoretically take inputs from other objects where prior.df might not be set appropriately, so we'd need to recompute it to be sure it's right. Conversely, estimateDisp can be used for stuff other than glmQLFit, so there's no point storing unnecessary stuff like the shrunken (i.e., posterior) QL dispersions.

ADD COMMENT
0
Entering edit mode
@veroniquestorme-9384
Last seen 2.9 years ago
Belgium

Thanks a lot for this quick answer, I get it now,

Veronique

ADD COMMENT
0
Entering edit mode
@veroniquestorme-9384
Last seen 2.9 years ago
Belgium

Dear Aaron,

Is this statement then correct?

with glmfit: var(Ygi) = mu + V* mu^2 where V is a weighted variance of the tagwise scale S (deviance/residualdf) and the trended dispersion Psi

with glmQLFit: var(Ygi) = V(mu + Psi* mu^2) with V and Psi as before

Veronique

ADD COMMENT
0
Entering edit mode

I'd direct you towards a couple of publications that can better answer your question. For glmFit, see http://www.statsci.org/smyth/pubs/edgeRChapterPreprint.pdf, and for glmQLFit, see http://www.statsci.org/smyth/pubs/QLedgeRPreprint.pdf.

ADD REPLY

Login before adding your answer.

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