| getGroupsFormula.gls(nlme) | R Documentation |
If present, the grouping formula associated with the correlation
structure (corStruct) of object is returned either as
a named list with a single one-sided formula, or a single one-sided
formula, depending on the value of asList. If object
does not include a correlation structure, or if the correlation
structure does not include groups, NULL is returned.
getGroupsFormula(object, asList)
object |
an object inheriting from class gls, representing
a generalized least squares fitted linear 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. |
if a correlation structure with groups is included in object, a
one-sided formula, or a list with a single one-sided formula, with the
corresponding grouping structure, else NULL.
Jose Pinheiro and Douglas Bates
library(nlme)
data(Ovary)
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
correlation = corAR1(form = ~ 1 | Mare))
getGroupsFormula(fm1)