shrink.phi: Shrinkaged Estimates of Error Variance

Description Usage Arguments Value Examples

View source: R/shrink.phi.R

Description

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

Usage

1
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

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

rmRNAseq documentation built on Nov. 8, 2019, 5:06 p.m.