[BioC] edgeR glmLRT pearson residual
Gordon K Smyth
smyth at wehi.EDU.AU
Sun Feb 9 23:16:01 CET 2014
Dear Laura,
edgeR does not automatically provide residuals, but it does provide
information from which you can compute them yourself fairly easily.
To get Pearson residuals:
fit <- glmFit(y, design)
y <- fit$counts
mu <- fit$fitted.values
phi <- fit$dispersion
v <- mu*(1+phi*mu)
resid.pearson <- (y-mu) / sqrt(v)
To get deviances residuals you will need the devel version of edgeR:
d <- nbinomUnitDeviance(y,mu,phi)
resid.deviance <- sign(y-mu) * sqrt(d)
Better than either of these however is the midp-quantile residual:
resid.quantile <- zscoreNBinom(y,mu,size=1/phi)
To read about quantile residuals:
http://www.statsci.org/smyth/pubs/residual.html
Best wishes
Gordon
> Date: Sat, 8 Feb 2014 16:53:27 -0500
> From: Laura Eierman <lee27 at cornell.edu>
> To: bioconductor at r-project.org
> Subject: [BioC] edgeR glmLRT pearson residual
>
> Hello,
> I am interested in applying my edgeR results to a modulated modularity
> clustering algorithm to explore community structure in the significantly
> differentially expressed genes.
>
> Is there a straightforward way to calculate Pearson or deviance residual
> values from the glmLRT results?
>
> Thank you.
> Cheers, Laura
______________________________________________________________________
The information in this email is confidential and intend...{{dropped:4}}
More information about the Bioconductor
mailing list