Returns an array of cells for the (backward shifted, backshifted or lagged time series.
Syntax
LAG(X, Order, K)
X is the univariate time series data (a one dimensional array of cells (e.g. rows or columns)).
Order 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) 
K is the lag order (e.g. k=0 (no lag), k=1 (1st lag), etc.). If missing, the default value of zero is assumed.
Remarks
 The time series is homogeneous or equally spaced.
 The time series may include missing values (e.g. #N/A) at either end.
 k (i.e. lag order) should be nonnegative and less than the size of the time series.
 The lagged time series is:
$$ \left[z_t\right] = L^k\left[x_t\right] = \left[x_{tk}\right] $$
Where:
 $ \left[z_t\right]$ is the lagged time series.
 $\left[x_t\right]$ is the input time series.
 $L$ is the lag operator.
 $k$ is the lag order.
$k \leq T1 $
Examples
Example 1:


Files Examples
References
 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: 0471690740
 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
Comments
Article is closed for comments.