These functions wrappers around various modelling tools to ensure a
consistent input for trending functions. See details for available model
interfaces.
Usage
glm_model(formula, family, ...)
glm_nb_model(formula, ...)
lm_model(formula, ...)
brms_model(formula, family, ...)
Value
A trending_model object (S3 class inheriting list), containing
items which can be accessed by various accessors - see
?trending_model-accessors.
Arguments
formula
The formula of the model, with the response variable on the
left of a tilde symbol, and predictors on the right hand-side; variable
names used in the formula will need to be matched by columns in the data
input to other functions.
family
The model family to be used for the response variable.
...
Further arguments passed underlying models: lm for lm_model(),
glm for glm_model(), MASS::glm.nb() for glm_nb_model, brms::brm()
for brms_model. Not used for print and format.
Author
Dirk Schumacher
Details
The following interfaces are available:
lm_model: interface for linear models implemented in
stats::lm().
glm_model: interface for generalised linear models (GLMs) implemented in
stats::glm().
glm_nb_model: interface for negative binomial generalied linear models
implemented in MASS::glm.nb.
brms_model: interface for Bayesian regression models implemented in
brms::brm.