Learn R Programming

nlme (version 3.1-38)

getResponse.gls: Extract gls Object Response

Description

This method function extracts the response variable used in fitting the linear model corresponding to object.

Usage

## S3 method for class 'gls':
getResponse(object, form)

Arguments

object
an object inheriting from class gls, representing a generalized least squares fitted linear model.
form
an optional two-sided formula. Defaults to formula(object).

Value

  • a vector with the response variable corresponding to the linear model represented by object.

See Also

gls

Examples

Run this code
data(Ovary)
fm1 <- gls(follicles ~ sin(2*pi*Time) + cos(2*pi*Time), Ovary,
           correlation = corAR1(form = ~ 1 | Mare))
getResponse(fm1)

Run the code above in your browser using DataLab