Lag | R Documentation |
Lag a vector or a matrix of observations by iK
periods.
Lag(mY, iK)
mY |
a vector or a matrix of observations. |
iK |
An integer indicating the number of lag. |
The function returns a numeric
vector or a matrix
depending on the class of mY
. The dimension of the object is preserved and NA's are introduced for the missing values.
An object of the class numeric
or matrix
.
Leopoldo Catania & Nima Nonejad
# Code chunk of Catania and Nonejad (2016) Dynamic Model Averaging
# for Practitioners in Economics and Finance: The eDMA Package
library(eDMA)
## load data
data("USData")
UDData_lagged <- Lag(USData, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.