Learn R Programming

omics (version 0.1-5)

mlm: Multiple Linear Models

Description

Fits multiple linear models.

Usage

mlm(formula, data, vars, save.residuals=FALSE)

Arguments

formula
an object of class formula (or one that can be coerced to that class): a symbolic description of the models to be fitted.
data
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model.
vars
a character vector of variables of interest.
save.residuals
whether model residuals should be stored and returned.

Value

A list with elements:

See Also

lm

Examples

Run this code
    coefs <- matrix(runif(6*10), 6, 10)
    X <- matrix(rnorm(100*5), 100, 5)
    Y <- cbind(1, X) 

    models <- mlm(Y ~ X)
    str(models)

Run the code above in your browser using DataLab