Is there a faster lm function

前端 未结 4 924
闹比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:48

    lmfit in the package Rfast is even faster than .lm.fit. The only drawback is that it does not work when the design matrix does not have full rank.

提交回复
热议问题