How to speed up GLM estimation?

前端 未结 3 763
花落未央
花落未央 2020-12-10 04:38

I am using RStudio 0.97.320 (R 2.15.3) on Amazon EC2. My data frame has 200k rows and 12 columns.

I am trying to fit a logistic regression with approximately 1500 p

3条回答
  •  醉话见心
    2020-12-10 05:05

    Although a bit late but I can only encourage dickoa's suggestion to generate a sparse model matrix using the Matrix package and then feeding this to the speedglm.wfit function. That works great ;-) This way, I was able to run a logistic regression on a 1e6 x 3500 model matrix in less than 3 minutes.

提交回复
热议问题