Title: | Variance Estimation of FMT Method (Fully Moderated T-Statistic) |
---|---|
Description: | The FMT method computes posterior residual variances to be used in the denominator of a moderated t-statistic from a linear model analysis of gene expression data. It is an extension of the moderated t-statistic originally proposed by Smyth (2004) <doi:10.2202/1544-6115.1027>. LOESS local regression and empirical Bayesian method are used to estimate gene specific prior degrees of freedom and prior variance based on average gene intensity levels. The posterior residual variance in the denominator is a weighted average of prior and residual variance and the weights are prior degrees of freedom and residual variance degrees of freedom. The degrees of freedom of the moderated t-statistic is simply the sum of prior and residual variance degrees of freedom. |
Authors: | Lianbo Yu [aut, cre] |
Maintainer: | Lianbo Yu <[email protected]> |
License: | GPL-2 |
Version: | 2.0 |
Built: | 2024-10-16 06:20:36 UTC |
Source: | CRAN |
This function computes posterior residual variances to be used in the denominator of a moderated t-statistic from a linear model analysis of gene expression data. It is an extension of the moderated t-statistic originally proposed by Smyth (Statistical Applications in Genetics and Molecular Biology, 2004;3:Article3). LOESS local regression and empirical Bayesian method are used to estimate gene specific prior degrees of freedom and prior variance based on average gene intensity levels. The posterior residual variance in the denominator is a weighted average of prior and residual variance and the weights are prior degrees of freedom and residual variance degrees of freedom. The degrees of freedom of the moderated t-statistic is simply the sum of prior and residual variance degrees of freedom.
fmt( Amean, sigmasq, df, span1 = 0.5, span2 = 0.95, iter1 = 4, iter2 = 4, b = 20 )
fmt( Amean, sigmasq, df, span1 = 0.5, span2 = 0.95, iter1 = 4, iter2 = 4, b = 20 )
Amean |
average log intensity levels of all genes |
sigmasq |
residual variances of all genes |
df |
degrees of freedom for sigmasq |
span1 |
span parameter in LOESS smoothing function, default is 0.5 |
span2 |
span parameter in LOESS smoothing function, default is 0.95 |
iter1 |
iteration number in LOESS smoothing function, default is 4 |
iter2 |
iteration number in LOESS smoothing function, default is 4 |
b |
number of genes on either side of moving average window when calculating variance of log residual variances, default is 20 |
A data frame with the following components:
'df.prior' the estimated prior degrees of freedom.
'df.post' the estimated posterior degrees of freedom.
's2.prior' the estimated prior variance.
's2.post' the estimated posterior variance.
'Ameansort' intermediate result.
'eg' intermediate result.
'egpred' intermediate result.
'MAvar' intermediate result.
'tri.d0' intermediate result.
## Simulate gene expression data for 1000 genes and 10 samples in two groups. exp <- rnorm(1000,8,2) sd <- 0.5*sqrt(4/rchisq(1000, df=7)) y <- matrix(rnorm(1000*10, exp, sd),1000,10) rownames(y) <- paste("Gene",1:1000) design <- cbind(Grp1=1, Grp2vs1=c(0,0,0,0,0,1,1,1,1,1)) ## limma fit fit <- lmFit(y,design) ## fmt fit fmt.fit <- fmt(fit$Amean, fit$sigma, fit$df.residual)
## Simulate gene expression data for 1000 genes and 10 samples in two groups. exp <- rnorm(1000,8,2) sd <- 0.5*sqrt(4/rchisq(1000, df=7)) y <- matrix(rnorm(1000*10, exp, sd),1000,10) rownames(y) <- paste("Gene",1:1000) design <- cbind(Grp1=1, Grp2vs1=c(0,0,0,0,0,1,1,1,1,1)) ## limma fit fit <- lmFit(y,design) ## fmt fit fmt.fit <- fmt(fit$Amean, fit$sigma, fit$df.residual)
This function provides fitting plots of fmt function.
plotFMT(x, type, ...)
plotFMT(x, type, ...)
x |
return list from fmt function |
type |
type of plots |
... |
extra parameters for plot function |
No return value.