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

Error in Ptr$initMatrices() : std::bad_alloc #16

Closed abdullahicen closed 3 years ago

abdullahicen commented 3 years ago

Hi, I'm trying to model in rlmer and my data set is long (20k data for 1500 earthquakes). First i tried to run rlmer and get this error

Error in .local(x, y, ...) : Cholmod error 'out of memory' at file ../Core/cholmod_memory.c, line 146

and then when i saw the answer in the previous question i tried rlmerRcpp and got that error

Error in Ptr$initMatrices() : std::bad_alloc

Is there any way to solve this problem in my computer. Thank you for your interest. Bests

kollerma commented 3 years ago

Hello

I'm assuming you have tried simpler model formulation and determined you need the model you're trying to fit.

The easiest way is to run on another machine with more ram. If that is not an option, there are a few things you can try to maximise the free ram on your machine:

Unfortunately the initialisation requires quite a bit of memory, more so than the fitting process itself. It's possible that the memory requirement can be reduced using some clever linear algebra. Given the right trick, it should be quite easy to change the code.

Best, Manuel