nullMatrix {edge} | R Documentation

## Matrix representation of null model

### Description

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

### Usage

    nullMatrix(object)

    nullMatrix(object) <- value

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

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

### Arguments

`object` | `S4 object`: `deSet`
`value` | `matrix`: null model matrix where columns are covariates and rows are observations

### Value

`nullMatrix` returns the value of the null model matrix.

### Author(s)

John Storey, Andrew Bass

### See Also

`deSet`, `fullModel` and `fullModel`

### 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 as a matrix
    mat_null <- nullMatrix(de_obj)

[Package edge version 2.24.0 Index]