lrt: Performs F-test (likelihood ratio test using Normal...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

lrt performs a generalized likelihood ratio test using the full and null models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
lrt(object, de.fit, nullDistn = c("normal", "bootstrap"), weights = NULL,
  bs.its = 100, seed = NULL, verbose = TRUE, mod.F = FALSE, ...)

## S4 method for signature 'deSet,missing'
lrt(object, de.fit, nullDistn = c("normal",
  "bootstrap"), weights = NULL, bs.its = 100, seed = NULL,
  verbose = TRUE, mod.F = FALSE, ...)

## S4 method for signature 'deSet,deFit'
lrt(object, de.fit, nullDistn = c("normal",
  "bootstrap"), weights = NULL, bs.its = 100, seed = NULL,
  verbose = TRUE, mod.F = FALSE, ...)

Arguments

object

S4 object: deSet.

de.fit

S4 object: deFit. Optional.

nullDistn

character: either "normal" or "bootstrap", If "normal" then the p-values are calculated using the F distribution. If "bootstrap" then a bootstrap algorithm is implemented to simulate statistics from the null distribution. In the "bootstrap" case, empirical p-values are calculated using the observed and null statistics (see empPvals). Default is "normal".

weights

matrix: weights for each observation. Default is NULL.

bs.its

integer: number of null statistics generated (only applicable for "bootstrap" method). Default is 100.

seed

integer: set the seed value. Default is NULL.

verbose

boolean: print iterations for bootstrap method. Default is TRUE.

mod.F

boolean: Moderated F-test, recommended for experiments with a small sample size. Default is FALSE.

...

Additional arguments for apply_qvalue and empPvals function.

Details

lrt fits the full and null models to each gene using the function fit_models and then performs a likelihood ratio test. The user has the option to calculate p-values a Normal distribution assumption or through a bootstrap algorithm. If nullDistn is "bootstrap" then empirical p-values will be determined from the qvalue package (see empPvals).

Value

deSet object

Author(s)

John Storey, Andrew Bass

References

Storey JD, Xiao W, Leek JT, Tompkins RG, and Davis RW. (2005) Significance analysis of time course microarray experiments. Proceedings of the National Academy of Sciences, 102: 12837-12842.

http://en.wikipedia.org/wiki/Likelihood-ratio_test

See Also

deSet, build_models, odp

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# import data
library(splines)
data(kidney)
age <- kidney$age
sex <- kidney$sex
kidexpr <- kidney$kidexpr
cov <- data.frame(sex = sex, age = age)

# create models
null_model <- ~sex
full_model <- ~sex + ns(age, df = 4)

# create deSet object from data
de_obj <- build_models(data = kidexpr, cov = cov, null.model = null_model,
full.model = full_model)

# lrt method
de_lrt <- lrt(de_obj, nullDistn = "normal")

# to generate p-values from bootstrap
de_lrt <- lrt(de_obj, nullDistn = "bootstrap", bs.its = 30)

# input a deFit object directly
de_fit <- fit_models(de_obj, stat.type = "lrt")
de_lrt <- lrt(de_obj, de.fit = de_fit)

# summarize object
summary(de_lrt)

jdstorey/edge documentation built on May 18, 2019, 11:35 p.m.