Creates lagged variables for use with bayesGAM, including the functionality
to create lags for each specified subject if desired. The input data must be pre-
sorted according by time, and within each subject id if specified.
Usage
L(x, k = 1, id = NULL)
Arguments
x
numeric vector
k
integer vector of lagged variables to create
id
optional identification number for each subject
Value
numeric vector or matrix of the lagged variable(s)
References
Zeileis A (2019). dynlm: Dynamic Linear Regression. R package version 0.3-6