| animate,deseats-method {deseats} | R Documentation |
Animate Locally Weighted Regression Results
Description
The results of locally weighted regression results
acquired through decomposition of seasonal time series
via the function deseats can be
animated automatically.
Usage
## S4 method for signature 'deseats'
animate(
object,
col.obs = "grey74",
col.fit = "red",
col.weights = "#00D40E",
col.window = "deepskyblue4",
col.spot = "orange",
save = NULL,
xlab = "Time",
ylab1 = "Estimated trend + seasonality",
ylab2 = "Active kernel weights",
main = NULL,
...
)
Arguments
object |
an object of class |
col.obs |
the color to use for the observations. |
col.fit |
the color to use for the fitted values. |
col.weights |
the color to use for the active kernel weights. |
col.window |
the color to use for the window defined through the bandwidth |
col.spot |
the color to highlight the estimation time point. |
save |
whether to save the animation or not; for |
xlab |
the label for the x-axis. |
ylab1 |
the label for the y-axis on the left-hand side. |
ylab2 |
the label for the second y-axis on the right-hand side. |
main |
the plot title. |
... |
currently without use; implemented for possible future compatibility. |
Details
deseats estimation results are automatically animated
through this method. It shows the observed series together with fitted
values (trend + seasonality), the smoothing window, the fitted values from
the local regression, and the active kernel weights.
Value
The function returns NULL.
Author(s)
Dominik Schulz (Research Assistant) (Department of Economics, Paderborn University),
Author and Package Creator
Examples
### Creating the animation might take a while
Xt <- log(EXPENDITURES)
smoothing_options <- set_options(order_poly = 3)
est <- deseats(Xt, smoothing_options = smoothing_options)
animate(est)