I am working on regular data.frame
that looks to be to big for glm
function so I've decided I'll work on a sparse represantation of a model matrix so I could put this sparse matrix into glmnet
function. But sparse.model.matrix
looks like to drops some rows from original matrix. Any idea why that happens and any solution how to avoid that?
Code below:
> mm <- sparse.model.matrix(~clicks01+kl_tomek*bc1+hours+plec+1,
data = daneOst)
> dim(mm)
[1] 1253223 292
> dim(daneOst)
[1] 1258836 6