Learn R Programming

tsdataleaks (version 2.1.1)

find_dataleaks: Correlation calculation based on rolling window with overlapping observations.

Description

Correlation calculation based on rolling window with overlapping observations.

Usage

find_dataleaks(lstx, h, cutoff = 1)

Value

list of matching quantities

Arguments

lstx

list of time series

h

length of forecast horizon

cutoff

benchmark value for corr absolute value, default 1

Examples

Run this code
a = rnorm(15)
lst <- list(
 a = a,
 b = c(a[10:15], rnorm(10), a[1:5], a[1:5]),
 c = c(rnorm(10), a[1:5])
)
find_dataleaks(lst, h=5)
#' a = rnorm(15)
lst <- list(
 x= a,
 y= c(rnorm(10), a[1:5])
)

find_dataleaks(lst, h=5)

# List without naming elements
lst <- list(
 a,
 c(rnorm(10), a[1:5], a[1:5]),
 rnorm(10)
)
find_dataleaks(lst, h=5)

Run the code above in your browser using DataLab