Extract gls Object Grouping Formula
Usage
getGroupsFormula(object, asList)
Arguments
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 .
|
Description
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.Value
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
.Author(s)
Jose Pinheiro and Douglas BatesSee Also
corStruct
, getGroups.gls
Examples
library(gls)
data(Orthodont)
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
correlation = corAR1(form = ~ 1 | Mare))
getGroupsFormula(fm1)