nlme (version 3.1-1)

getGroupsFormula.lmList: Extract lmList Object Grouping Formula

Description

A formula representing the grouping factor determining the partitioning of the observations used to produce the lm components of object is obtained and returned as a list with a single component, or as a one-sided formula.

Usage

getGroupsFormula(object, asList)

Arguments

object
an object inheriting from class lmList, representing a list of lm objects with a common model.
asList
an optional logical value. If TRUE the returned value with be a list of formulas; else, if FALSE the returned value will be a one-sided formula. Defaults to FALSE.

Value

  • a one-sided formula, or a list with a single one-sided formula, representing the grouping factor corresponding to the lm components of object.

See Also

lmList, getGroups.lmList

Examples

Run this code
data(Orthodont)
fm1 <- lmList(distance ~ age | Subject, Orthodont)
getGroupsFormula(fm1)

Run the code above in your browser using DataCamp Workspace