View source: R/tidier_methods.R
augment.mvgam | R Documentation |
Add fits and residuals to the data, implementing the generic augment
from
the package broom.
## S3 method for class 'mvgam'
augment(x, robust = FALSE, probs = c(0.025, 0.975), ...)
x |
An object of class |
robust |
If |
probs |
The percentiles to be computed by the quantile function. |
... |
Unused, included for generic consistency only. |
A list
is returned if class(x$obs_data) == 'list'
, otherwise a tibble
is
returned, but the contents of either object is the same.
The arguments robust
and probs
are applied to both the fit and
residuals calls (see fitted.mvgam()
and residuals.mvgam()
for details).
A list
or tibble
(see details) combining:
The data supplied to mvgam()
.
The outcome variable, named as .observed
.
The fitted backcasts, along with their variability and credible bounds.
The residuals, along with their variability and credible bounds.
residuals.mvgam
, fitted.mvgam
Other tidiers:
tidy.mvgam()
set.seed(0)
dat <- sim_mvgam(T = 80,
n_series = 3,
mu = 2,
trend_model = AR(p = 1),
prop_missing = 0.1,
prop_trend = 0.6)
mod1 <- mvgam(formula = y ~ s(season, bs = 'cc', k = 6),
data = dat$data_train,
trend_model = AR(),
family = poisson(),
noncentred = TRUE,
chains = 2,
silent = 2)
augment(mod1, robust = TRUE, probs = c(0.25, 0.75))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.