mls {midasr} | R Documentation |
MIDAS lag structure
Description
Create a matrix of selected MIDAS lags
Usage
mls(x, k, m, ...)
Arguments
x |
a vector |
k |
a vector of lag orders, zero denotes contemporaneous lag. |
m |
frequency ratio |
... |
further arguments used in fitting MIDAS regression |
Details
The function checks whether high frequency data is complete, i.e. m
must divide length(x)
.
Value
a matrix containing the lags
Author(s)
Virmantas Kvedaras, Vaidotas Zemlys
Examples
## 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)
[Package midasr version 0.8 Index]