The model formula will be handled using stats::model.matrix()
, and so
the the same approach to include interactions in stats::lm()
applies when
specifying the formula
. In addition to stats::lm()
, it is possible to
include common_xregs
in the model formula, such as trend()
, season()
,
and fourier()
.
Specials
xreg
Exogenous regressors can be included in a LOGISTIC model without explicitly
using the xreg()
special. Common exogenous regressor specials as specified
in common_xregs
can also be used. These regressors are handled using
stats::model.frame()
, and so interactions and other functionality behaves
similarly to stats::lm()
.
xreg(...)
... | Bare expressions for the exogenous regressors (such as log(x) ) |
Examples
melb_rain |>
model(logistic = LOGISTIC(Wet ~ fourier(K = 5, period = "year")))
#> # A mable: 1 x 1
#> logistic
#> <model>
#> 1 <LOGISTIC>