rollcor: Rolling correlation of one or multiple features vs. a target...

Description Usage Arguments Value

Description

Over a sliding window, calculate the rolling correlation of an xts matrix of features vs. a target variable.

Usage

1
rollcor(features, target, width = 63)

Arguments

features

The xts matrix containing the features.

target

An xts matrix with identical indices as the features matrix. If the target is a prediction further out in time, then the time relationship between features and target should be properly lagged prior to calling this function.

width

The rolling window width used to calculate the rolling correlation between the features and the target.

Value

Returns an xts matrix of the same width as the feature matrix with the rolling correlation values.


jeanmarcgp/xtsanalytics documentation built on May 19, 2019, 12:38 a.m.