Extract lme Object Grouping Formula

DESCRIPTION:

The grouping formula associated with the random effects structure ( reStruct) of object is returned either as a named list of one-sided formulas, or a single one-sided formula, depending on the value of asList. The components of the returned list are ordered from outermost to innermost level and are named after the grouping factor expression.

USAGE:

getGroupsFormula(object, asList) 

REQUIRED ARGUMENTS:

object
an object inheriting from class lme, representing a fitted linear mixed-effects model.

OPTIONAL ARGUMENTS:

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 of one-sided formulas, with the grouping structure associated with the random effects structure of object .

SEE ALSO:

,

EXAMPLES:

fm1 <- lme(distance ~ age + Sex, data = Orthodont, random = ~ 1) 
getGroupsFormula(fm1)