Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

roll_lm

Rolling Linear Regression


Description

Rolling linear regression calculates regression coefficients over n past paired values.
Others return numeric vector

Usage

roll_lm(x, y, n)

roll_correlation(x, y, n)

Arguments

x, y

numeric vectors

n

window size

Value

roll_lm returns data.table with columns alpha, beta, r, r.squared

See Also


QuantTools

Enhanced Quantitative Trading Modelling

v0.5.7.1
GPL-3
Authors
Stanislav Kovalevsky
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.