| 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.
The following mainly applies to
Another argument is |
By default
this function is preferred to calling object@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
# This is new:
fit@family@infos()$muxypw # Proportion or count?
fit@family@infos()$Mux4vglmnet # vglmnet needs counts?
fit@family@infos()$roundmux # Product is integer-valued?
depvar(fit, muxypw = TRUE, roundmux = TRUE) # Counts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.