decomp | R Documentation |
Decomposes a time series represented by an inz_ts
object into its
seasonal, trend, and remainder components using the specified smoothing
method.
decomp(
x,
var = NULL,
sm_model = c("stl"),
mult_fit = FALSE,
model_range = NULL,
...
)
## S3 method for class 'inz_dcmp'
plot(
x,
recompose.progress = c(0, 0),
recompose = any(recompose.progress > 0),
ylab = NULL,
title = NULL,
colour = c("#1B9E46", "#45a8ff", "orangered"),
...
)
x |
An 'inz_dcmp' object representing the decomposed time series. |
var |
A character vector of length one, or |
sm_model |
The smoothing method to be used. Currently on "stl" is available. |
mult_fit |
If |
model_range |
The range of data to be decomposed by the model. It can be
specified as dates or years. If part of |
... |
Additional arguments (ignored). |
recompose.progress |
A numeric vector of length 2, controlling the display of recomposition progress when 'recompose' is 'TRUE'. The first component shows the progress for the seasonal component (0 to 1), and the second component tracks the number of observations recomposed so far. |
recompose |
Logical indicating whether the recomposition should be displayed or not. |
ylab |
The label for the y-axis of the plot. |
title |
The title for the plot. |
colour |
A vector of three colors specifying the colors for the trend, seasonal, and residuals components, respectively. |
An inz_dcmp
object, which is a sub-class of dable
,
representing the decomposed components of the time series.
R. B. Cleveland, W. S. Cleveland, J.E. McRae, and I. Terpenning (1990) STL: A Seasonal-Trend Decomposition Procedure Based on Loess. Journal of Official Statistics, 6, 3iV73.
dable
ts <- inzightts(visitorsQ)
d <- decomp(ts)
## Not run:
plot(d)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.