mlsd: MIDAS lag structure with dates

Description Usage Arguments Value Author(s) Examples

View source: R/midaslag.R

Description

MIDAS lag structure with dates

Usage

1
mlsd(x, k, datey, ...)

Arguments

x

a vector

k

lags, a vector

datey

low frequency dates

...

further arguments used in fitting MIDAS regression

Value

a matrix containing the first differences and the lag k+1.

Author(s)

Virmantas Kvedaras, Vaidotas Zemlys-Balevičius

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
x <- c(1:144)
y <- c(1:12)
datey <- (y-1)*12+1

#msld and mls should give the same results

m1 <- mlsd(x, 0:5, datey)

m2 <- mls(x, 0:5, 12)

sum(abs(m1 - m2))

midasr documentation built on Feb. 23, 2021, 5:11 p.m.