shrink.phi: Shrinkaged Estimates of Error Variance

View source: R/shrink.phi.R

shrink.phiR Documentation

Shrinkaged Estimates of Error Variance

Description

This function implements Smyth's approach (empirical bayes estimate of error variance of genes, limma paper 2004).

Usage

shrink.phi(phi.hat, den.df)

Arguments

phi.hat

a numerical vector of the estimated of error variance of all genes.

den.df

denominator degree of freedom associated with the estimated variances phi.hat (=n sample -rank(design)).

Value

a list of 3 components

phi.shrink

vector of shrinkaged estimates of variance.

d0

estimated prior degree of freedom used inthe shrinkage procedure.

phi0

estimated prior variance used in the shrinkage procedure.

Examples

phi.hat <- rchisq(1000, 1)
den.df <- 2
shrinkout <- rmRNAseq:::shrink.phi(phi.hat, den.df)
hist(shrinkout$phi.shrink)

ntyet/rmRNAseq documentation built on July 7, 2023, 11:10 a.m.