kollerma / robustlmm

This is an R-package for fitting linear mixed effects models in a robust manner. The method is based on the robustification of the scoring equations and an application of the Design Adaptive Scale approach.
28 stars 9 forks source link

Cholmod error 'problem too large' at file #24

Closed letitburn00 closed 2 years ago

letitburn00 commented 2 years ago

Hello, I am attempting to run a model using rlmer, but I get the following error: Error in asMethod(object) : Cholmod error 'problem too large' at file ../Core/cholmod_dense.c, line 102 From Google searches, it seems like the problem may have to do with matrix sparsity; however, the exact same call runs just fine with lmer. The dataset is also quite large (~190,000 obs), so that might also be causing the issue. Any troubleshooting ideas or workarounds? I'd really like to be able to use robust estimation methods within a multilevel modeling framework and this package seems to be one of the few ways to do so.

Thanks so much for any help you can provide!

kollerma commented 2 years ago

Hello

190'000 is quite a lot - lmer can deal with that as it solves a much easier problem. That said, there is a much more memory efficient version of robustlmm that hasn't been released to CRAN yet. You can install it using devtools::install_github("kollerma/robustlmm"). There are two implementations, one written predominantly in R (rlmer) and another one where most things are implemented in C++ (rlmerRcpp). The latter is more memory efficient. When fitting the dataset in #23 with 30,904 observations using rlmerRcpp, R ended up allocating just less than 7GB.

Just to have it mentioned: best is probably to run on a subset of the data first and then only run the final model with all data.