Response: Extract the Response from Several Models

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ModTools.R

Description

Time after time, in the course of our daily work, we experience that the response variable is hidden very deeply in the object. This again leads to superfluous consultation of the documentation. Reponse() relieves us of this work.

Usage

1

Arguments

x

the model to use

...

more arguments

Details

The function implements the extraction of the response variables for all the models listed in the package's help text.

Value

the response of model x

Author(s)

Andri Signorell <andri@signorell.net>

See Also

model.frame, model.response, RefLevel

Examples

1
2
3
4
5
6
r.rpart <- FitMod(diabetes ~ ., d.pima, fitfn="rpart")
Response(r.rpart)

# up to the attribute "response" this is the same
identical(StripAttr(Response(r.rpart), "response"),
          model.response(model.frame(r.rpart)))

ModTools documentation built on July 26, 2021, 9:06 a.m.