Command Reference : Matrix Language Reference
  
 
@lag
n-th order lag function.
Syntax: @lag(x, n)
x: matrix, vector, svector
n: matrix, vector, svector
Return: series
Returns n-th order lag of the vector, svector, or matrix x. If n is not an integer, the integer floor will be used.
Examples
matrix x = @mnrnd(100, 2)
matrix lag = @lag(x, 1)
matrix diff = x - lag
computes the lag and first difference of the random matrix X, while
vector lagc1 = @lag(x.@col(1), 2)
computes the second lag of the first column of X.
Cross-references
See also matplace.