Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

depvar

Response Variable Extracted


Description

A generic function that extracts the response/dependent variable from objects.

Usage

depvar(object, ...)

Arguments

object

An object that has some response/dependent variable.

...

Other arguments fed into the specific methods function of the model. In particular, sometimes type = c("lm", "lm2") is available, in which case the first one is chosen if the user does not input a value. The latter value corresponds to argument form2, and sometimes a response for that is optional.

Details

By default this function is preferred to calling fit@y, say.

Value

The response/dependent variable, usually as a matrix or vector.

Author(s)

Thomas W. Yee

See Also

Examples

pneumo <- transform(pneumo, let = log(exposure.time))
(fit <- vglm(cbind(normal, mild, severe) ~ let, propodds, data = pneumo))
fit@y        # Sample proportions (not recommended)
depvar(fit)  # Better than using fit@y; dependent variable (response)
weights(fit, type = "prior")  # Number of observations

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.