Extract reStruct Grouping Formula

DESCRIPTION:

The names of the object components are used to construct a one-sided formula, or a named list of formulas, depending on the value of asList. The components of the returned list are ordered from outermost to innermost level.

USAGE:

getGroupsFormula(object, asList) 

REQUIRED ARGUMENTS:

object
an object inheriting from class reStruct, representing a random effects structure and consisting of a list of pdMat objects.

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 object.

SEE ALSO:

,

EXAMPLES:

rs1 <- reStruct(list(A = pdDiag(diag(2), ~age), B = ~1)) 
getGroupsFormula(rs1)