mls | R Documentation |
Create a matrix of selected MIDAS lags
mls(x, k, m, ...)
x |
a vector |
k |
a vector of lag orders, zero denotes contemporaneous lag. |
m |
frequency ratio |
... |
further arguments used in fitting MIDAS regression |
The function checks whether high frequency data is complete, i.e. m
must divide length(x)
.
a matrix containing the lags
Virmantas Kvedaras, Vaidotas Zemlys
## Quarterly frequency data
x <- 1:16
## Create MIDAS lag for use with yearly data
mls(x,0:3,4)
## Do not use contemporaneous lag
mls(x,1:3,4)
## Compares with embed when m=1
embed(x,2)
mls(x,0:1,1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.