[R-SIG-Finance] repeating regression

Robert A'gata rhelpacc at gmail.com
Tue Nov 22 04:52:59 CET 2011


Hi,

I think my problem is a bit mundane but it's quite intriguing. Imagine
I have a matrix of 10 by 2 million. The first 5 columns are x and the
last 5 are y values. I have to regress y on x (assume 0 intercept) for
each row to observe time series of the slope. I am wondering if there
is any way to speed this calculation up? I tried with apply. But it is
still slow. Is there any trick I should know? Thank you.

Robert



More information about the R-SIG-Finance mailing list