Home | Command Reference | Run Example
The Lag command converts a time series into Lagged time series
Main idea: rather than analyzing the lag of a variable.
lag(sp500,5)
This example transforms the UNRATE in to a series of four month lags
lag(series,12)
For a time series X, the lag:
Lag(X,n) = xtn
lag(RSAFSNA,1)
Instead of examining the level of retail sales, this transformation focuses on monthly growth rates. Seasonal effects, business cycle dynamics, and unusual economic events often become easier to identify after converting the series to growth rates.
sales = lag(RSAFSNA,5)
plot(sales)
The lag command is one of the foundational transformations used throughout RainbowStats.