apply_sva {edge} | R Documentation

## Estimate surrogate variables

### Description

Runs `sva` on the null and full models in `deSet`. See `sva` for additional details.

### Usage

    apply_sva(object, ...)

    ## S4 method for signature 'deSet'
    apply_sva(object, ...)

### Arguments

`object` | `S4 object`: `deSet`
`...` | Additional arguments for `sva`

### Value

`deSet` object where the surrogate variables estimated by `sva` are added to the full model and null model matrices.

### Author(s)

John Storey, Jeffrey Leek, Andrew Bass

### References

Leek JT, Storey JD (2007) Capturing Heterogeneity in Gene Expression Studies by Surrogate Variable Analysis. PLoS Genet 3(9): e161. doi:10.1371/journal.pgen.0030161

Leek JT and Storey JD. (2008) A general framework for multiple testing dependence. Proceedings of the National Academy of Sciences, 105: 18718- 18723.

### See Also

`deSet`, `odp` and `lrt`

### Examples

    # 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)

    # run surrogate variable analysis
    de_sva <- apply_sva(de_obj)

    # run odp/lrt with surrogate variables added
    de_odp <- odp(de_sva, bs.its = 30)
    summary(de_odp)

[Package edge version 2.16.0 Index]