View source: R/deepTimeSeries.r
stationary | R Documentation |
Build a stationary data series by differencing
stationary(
dataset,
columns = 2L,
differences = 1L,
type = c("simple", "log", "percentage"),
suffix = "_delta",
adjust = TRUE
)
dataset |
A data set, usually a data frame. |
columns |
The names or indices of the columns to be differentiated to build a stationary series; if |
differences |
The number of differences for building stationary series. That's only relevant for the |
type |
The type of differencing to be used. Available types are |
suffix |
The suffix for every newly created column of the stationary series. |
adjust |
A logical value indicating whether NA values are included to fill up the entire data set in the newly
created columns for the stationary series ( |
Differencing is a method of transforming a time series. The equations for the different types of differencing are
simple
: d(t) = x(t) - x(t-1).
log
: d(t) = ln(x(t) / x(t-1)) = ln(x(t)) - ln(x(t-1)).
percentage
: d(t) = (x(t) / x(t-1)) - 1.
The data set with newly created columns for the stationary data series.
invert_differencing
.
Other Time Series:
diff_log()
,
diff_percentage()
,
diffinv_log()
,
diffinv_percentage()
,
diffinv_simple()
,
get_season()
,
invert_differencing()
,
lags()
,
partition()
,
period()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.