I'm trying to fit mixed effects models and I run out of memory. I have a 32GB mac and my dataset has 126400 rows. I'm using the mgcv package because with lme4 the models takes days to run and I read the bam() was recommended for large datasets. But when I include the random slopes then I run out of memory.
I tried the solution below that I found online but I keep getting the same error.
Anyone have any ideas?