Returns an array of cells for the differenced time series (i.e., $(1-L^S)^D)$.
DIFF(X, Order, K, D)
- is the univariate time series data (a one-dimensional array of cells (e.g., rows or columns)).
- is the time order in the data series (i.e. the first data point's corresponding date (earliest date = 1 (default), latest date = 0)).
Order Description 1 Ascending (the first data point corresponds to the earliest date) (default). 0 Descending (the first data point corresponds to the latest date).
- is the seasonal difference order (e.g., K = 0 (no lag), S = 1 (1st lag), etc.) If missing, the default value of one is assumed.
- is the number of repeated differencing (e.g., d = 0 (none), d = 1 (difference once), 2 = (difference twice), etc.). If missing, the default value of one is assumed.
- The DIFF operator is defined as follows: $$Y_t=\left(1-L^k\right)^d X_t$$ Where:
- $\left[y_t\right]$ is the difference time series.
- $\left[x_t\right]$ is the input time series.
- $L$ is the lag operator.
- $k$ is the seasonality length.
- $d$ is the difference order.
- The size of the output differenced time series is equal to the input time series, but with the first $s \times d$ observations are set to missing (i.e., #N/A).
- The seasonal difference order (i.e., $k$) must be non-negative and smaller than the time series size (i.e., $T$). $$0 \leq k \leq T-1$$
- The input time series is homogenous and equally spaced.
- The time series may include missing values (e.g., #N/A) at either end.
- D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906.
- James Douglas Hamilton; Time Series Analysis; Princeton University Press; 1st edition(Jan 11, 1994), ISBN: 691042896.
- Tsay, Ruey S.; Analysis of Financial Time Series; John Wiley & SONS; 2nd edition(Aug 30, 2005), ISBN: 0-471-690740.
- Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848.
- Walter Enders; Applied Econometric Time Series; Wiley; 4th edition(Nov 03, 2014), ISBN: 1118808568.