Learn R Programming

QuantTools (version 0.5.3)

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

Other technical indicators: bbands, crossover, ema, roll_percent_rank, roll_range, roll_sd, roll_volume_profile, rsi, sma, stochastic