.BG
.VE $Header: /usr3/s/current/s/.help/RCS/lag,v 1.2 83/12/30 19:29:36 rab Exp $
.FN lag
.TL
lag: Create a Lagged Time-Series
.CS
lag(x, k)
.PP
.AG x
a time-series.  Missing values (NAs) are allowed.
.AG k
the number of positions the new series is to lag the input
series (default=1); negative value will lead the series.
.RT
a time-series of the same length as `x' but lagged by `k'
positions.  Only the start and end dates are changed; the
series still has the same number of observations.
.PP
See also `tsmatrix' for aligning the time domains of several series.
.EX
l12gnp<-lag(gnp,12) # gnp lagged by 12 months
.KW ts*
.WR
