I am running rolling regressions in R, using with the data stored in a data.table
.
I have a working version, however it feels like a hack -- I
Not as far as I know; data.table
doesn't have any special features for rolling windows. Other packages already implement rolling functionality on vectors, so they can be used in the j
of data.table
. If they are not efficient enough, and no package has faster versions (?), then it's a case of writing faster versions yourself and (of course) contributing them: either to an existing package or creating your own.
Related questions (follow links in links) :
Using data.table to speed up rollapply
R data.table sliding window
Rolling regression over multiple columns in R