Computes a log-normal linear model and permutation based p-values.

Share:

Description

Wrapper to perform the permutation test on the t-statistic. This is the original method employed by metastats (for non-sparse large samples). We include CSS normalization though (optional) and log2 transform the data. In this method the null distribution is not assumed to be a t-dist.

Usage

1
2
fitLogNormal(obj, mod, useCSSoffset = TRUE, B = 1000, coef = 2,
  sl = 1000)

Arguments

obj

A MRexperiment object with count data.

mod

The model for the count distribution.

useCSSoffset

Boolean, whether to include the default scaling parameters in the model or not.

B

Number of permutations.

coef

The coefficient of interest.

sl

The value to scale by (default=1000).

Value

Call made, fit object from lmFit, t-statistics and p-values for each feature.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# This is a simple demonstration
data(lungData)
k = grep("Extraction.Control",pData(lungData)$SampleType)
lungTrim = lungData[,-k]
k = which(rowSums(MRcounts(lungTrim)>0)<30)
lungTrim = cumNorm(lungTrim)
lungTrim = lungTrim[-k,]
smokingStatus = pData(lungTrim)$SmokingStatus
mod = model.matrix(~smokingStatus)
fit = fitLogNormal(obj = lungTrim,mod=mod,B=1)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.