build_models {edge} | R Documentation

## Generate a deSet object with full and null models

### Description

`build_models` creates a `deSet` object. The user inputs the full and null models.

### Usage

    build_models(data, cov, full.model = NULL, null.model = NULL, ind = NULL)

### Arguments

`data` | `matrix`: gene expression data.
`cov` | `data.frame`: the covariates in the study.
`full.model` | `formula`: the adjustment and the biological variables of interest.
`null.model` | `formula`: the adjustment variables.
`ind` | `factor`: individuals sampled in the study. Default is NULL. Optional.

### Value

`deSet` object

### Author(s)

John Storey, Andy Bass

### See Also

`deSet`, `build_study`

### Examples

    # create ExpressionSet object from kidney dataset
    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)

[Package edge version 2.12.2 Index]