| getVarCov {nlme} | R Documentation | 
Extract variance-covariance matrix
Description
Extract the variance-covariance matrix from a fitted model, such as a mixed-effects model.
Usage
getVarCov(obj, ...)
## S3 method for class 'lme'
getVarCov(obj, individuals,
    type = c("random.effects", "conditional", "marginal"), ...)
## S3 method for class 'gls'
getVarCov(obj, individual = 1, ...)
Arguments
| obj | A fitted model.  Methods are available for models fit by
 | 
| individuals | For models fit by  | 
| individual | For models fit by  | 
| type | For models fit by  | 
| ... | Optional arguments for some methods, as described above | 
Value
A variance-covariance matrix or a list of variance-covariance matrices.
Author(s)
Mary Lindstrom lindstro@biostat.wisc.edu
See Also
Examples
fm1 <- lme(distance ~ age, data = Orthodont, subset = Sex == "Female")
getVarCov(fm1)
getVarCov(fm1, individuals = "F01", type = "marginal")
getVarCov(fm1, type = "conditional")
fm2 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
           correlation = corAR1(form = ~ 1 | Mare))
getVarCov(fm2)