The DIF() function returns a simple or seasonal differencing
transformation of the provided time series. DIF.rev() reverses the
transformation. Wrapper functions for diff and
diffinv of the stats package, respectively.
DIF(
x,
lag = ifelse(type == "simple", 1, stats::frequency(x)),
differences = NULL,
type = c("simple", "seasonal"),
...
)DIF.rev(
x,
lag = ifelse(type == "simple", 1, stats::frequency(x)),
differences = 1,
xi,
type = c("simple", "seasonal")
)
x if differences is automatically selected, and is not
set as greater than 0.
Same as diff otherwise.
A numeric vector or univariate time series containing the values to be differenced.
Integer indicating the lag parameter. Default set to 1 if
type = "simple", or frequency(x) if type = "seasonal".
Integer representing the order of the difference. If
NULL, the order of the difference is automatically selected using
ndiffs (if type = "simple") or
nsdiffs (if type = "seasonal") from the
forecast package.
Numeric vector or time series containing the initial values for the integrals. If missing, zeros are used.
Character string. Indicates if the function should perform simple or seasonal differencing.
Additional arguments passed to ndiffs (if
type = "simple") or nsdiffs (if type =
"seasonal") from the forecast package.
Rebecca Pontes Salles
R.J. Hyndman and G. Athanasopoulos, 2013, Forecasting: principles and practice. OTexts.
R.H. Shumway and D.S. Stoffer, 2010, Time Series Analysis and Its Applications: With R Examples. 3rd ed. 2011 edition ed. New York, Springer.
BCT,detrend, MAS,
LT, PCT
TSPred-deprecated