nullModel {edge} | R Documentation

## Null model equation from deSet object

### Description

These generic functions access and set the null model for `deSet` object.

### Usage

    nullModel(object)

    nullModel(object) <- value

    ## S4 method for signature 'deSet'
    nullModel(object)

    ## S4 replacement method for signature 'deSet'
    nullModel(object) <- value

### Arguments

`object` | `S4 object`: `deSet`
`value` | `formula`: The experiment design for the null model.

### Value

`nullModel` returns the formula for the null model.

### Author(s)

John Storey, Andrew Bass

### See Also

`deSet`

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

    # extract the null model equation
    mod_null <- nullModel(de_obj)

    # change null model in experiment but must update full model
    nullModel(de_obj) <- ~1
    fullModel(de_obj) <- ~1 + ns(age, df=4)

[Package edge version 2.18.0 Index]