depvar | R Documentation |
A generic function that extracts the response/dependent variable from objects.
depvar(object, ...)
object |
An object that has some response/dependent variable. |
... |
Other arguments fed into the specific methods function of
the model.
In particular, sometimes |
By default
this function is preferred to calling fit@y
, say.
The response/dependent variable, usually as a matrix or vector.
Thomas W. Yee
model.matrix
,
vglm
.
pneumo <- transform(pneumo, let = log(exposure.time))
(fit <- vglm(cbind(normal, mild, severe) ~ let, propodds, pneumo))
fit@y # Sample proportions (not recommended)
depvar(fit) # Better than using fit@y
weights(fit, type = "prior") # Number of observations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.