eBayesFMT {variancePartition} | R Documentation

## Empirical Bayes Fully Moderated t-statistics

### Description

Empirical Bayes Fully Moderated t-statistics from linear mixed model fit with dream

### Usage

    eBayesFMT(fit, data, Individual, method = c("VC", "WS"))

### Arguments

`fit` | model fit returned by dream of class MArrayLM2
`data` | data.frame with columns corresponding to formula
`Individual` | string referring to column in data.frame indicating which individual the repeated measures come from
`method` | Use either variance components ('VC') or Welch-Satterthwaite ('WS')

### Details

Applies empirical Bayes method of, Yu, et al. (2019) for linear mixed models. This method applies a prior and shrinkage to 1) the residual variance and 2) the variance component estimates for 'Individual'. 'Individual' refers to the variable indicating which individual the repeated measures come from. This method then combines posterior values from (1) and (2) to approximate the degrees of freedom for the t-statistic.

Yu, L., Zhang, J., Brock, G. et al. Fully moderated t-statistic in linear modeling of mixed effects for differential expression analysis. BMC Bioinformatics 20, 675 (2019). https://doi.org/10.1186/s12859-019-3248-9

### Examples

    # load library
    # library(variancePartition)
    library(BiocParallel)
    register(SerialParam())

    # load simulated data:
    # geneExpr: matrix of gene expression values
    # info: information/metadata about each sample
    data(varPartData)

    form <- ~ Batch + (1|Individual) + (1|Tissue)

    # Fit linear mixed model for each gene
    # run on just 10 genes for time
    fit = dream( geneExpr[1:10,], form, info)

    # view top genes using standard t-statistics
    topTable( fit )

    # Compute moderated t-statistics from Yu, et al, 2019
    fiteb = variancePartition:::eBayesFMT(fit, info, 'Individual')
    topTable( fiteb )

[Package variancePartition version 1.18.3 Index]