JeffreySarnoff / RollingFunctions.jl

Roll a window over data; apply a function over the window.
MIT License
114 stars 6 forks source link

Rolling Regression? #16

Open SeongDeokKo opened 4 years ago

SeongDeokKo commented 4 years ago

Hello, thank you for your commitment.

I want to know if RollingFunctions can be implemented when I have more than one variable.

Especially I want to use it to calculate rolling regression

JeffreySarnoff commented 4 years ago

Give me an explicit example of how you want it to work.

SeongDeokKo commented 4 years ago

Thank you for your comment.

Say using GLM, DataFrames data = DataFrame(X=[1,2,3,10,22], Y=[2,4,7,9,1] , Z = [15, 20 ,33, 29 ,37]) ols =lm(@formula(Y ~ X + Z ),data)

code is used to calculate OLS coefficients. Can I use RollingFunctions for this code ??

JeffreySarnoff commented 4 years ago

I don't know how that would be done.