| mvgam_formulae {mvgam} | R Documentation |
Details of formula specifications in mvgam
Description
Details of formula specifications in mvgam
Details
mvgam will accept an observation model formula and an optional
process model formula (via the argument trend_formula). Neither of these formulae can
be specified as lists, contrary to the accepted behaviour in some mgcv or brms models.
Note that it is possible to supply an empty formula where
there are no predictors or intercepts in the observation model (i.e. y ~ 0 or y ~ -1).
In this case, an intercept-only observation model will be set up but the intercept coefficient
will be fixed at zero. This can be handy if you wish to fit pure State-Space models where
the variation in the dynamic trend controls the average expectation, and/or where intercepts
are non-identifiable.
The formulae supplied to mvgam are exactly like those supplied to
glm except that smooth terms,
s,
te,
ti and
t2,
time-varying effects using dynamic,
monotonically increasing (using s(x, bs = 'moi'))
or decreasing splines (using s(x, bs = 'mod');
see smooth.construct.moi.smooth.spec for
details), as well as
Gaussian Process functions using gp,
can be added to the right hand side (and . is not supported in mvgam formulae).
Further details on specifying different kinds of smooth functions, and how to control their behaviours
by modifying their potential complexities and / or how the penalties behave, can be found in the
extensive documentation for the mgcv package.
Author(s)
Nicholas J Clark
See Also
mvgam,
formula.gam,
gam.models,
jagam,
gam,
s,
formula