a factor or a list of factors defining groups of observations
filter
a vector specifying a linear filter
nfreq
number of sine/cosine pairs to include
period
period
intercept
should basis matrix include a column of 1s?
Value
Lag returns a length(v) by length(k) matrix of
lagged variables. runMean returns a numeric vector of length
length(v). harmonic returns a matrix of sine/cosine
basis functions.
Author(s)
Roger D. Peng
Examples
## Ten day "time series"
x <- rnorm(10)
## Lag 1 of `x'
Lag(x, 1)
## Lag 0, 1, and 2 of `x'
Lag(x, 0:2)
## Running mean of lag 0, 1, and 2
runMean(x, 0:2)