Is there a faster lm function

前端 未结 4 925
闹比i
闹比i 2020-12-01 17:50

I would like to get the slope of a linear regression fit for 1M separate data sets (1M * 50 rows for data.frame, or 1M * 50 for array). Now I am using the lm()

4条回答
  •  一生所求
    2020-12-01 18:33

    Since 3.1.0 there is a .lm.fit() function. This function should be faster than lm() and lm.fit().

    It's described and its performance is compared with different lm functions here - https://rpubs.com/maechler/fast_lm.

提交回复
热议问题