model_values: Construct a model and return the model values
Description
One-stop shopping to fit a model and return the model output on the training data.
Usage
model_values(data, tilde, family = c("linear", "prob", "counts"))
Value
A vector (not a data frame) of the model evaluated on the training data.
This is intended mainly for use within mutate(), so that a general model can be used in
the place of simple reduction verbs like mean(), median()
Arguments
data
A data frame containing the training data. When used with mutate(), data will
hold the model specification, instead of tilde.
tilde
A model specification in the form of a tilde expression
family
The type of model architecture: "linear", "prob", or "counts"