This function implements Smyth's approach (empirical bayes estimate of error variance of genes, limma paper 2004).
shrink.phi(phi.hat, den.df)
a numerical vector of the estimated of error variance of all genes.
denominator degree of freedom associated with the estimated variances phi.hat (=n sample -rank(design)).
a list of 3 components
vector of shrinkaged estimates of variance.
estimated prior degree of freedom used inthe shrinkage procedure.
estimated prior variance used in the shrinkage procedure.
# NOT RUN { phi.hat <- rchisq(1000, 1) den.df <- 2 shrinkout <- rmRNAseq:::shrink.phi(phi.hat, den.df) hist(shrinkout$phi.shrink) # }
Run the code above in your browser using DataCamp Workspace