[R-sig-ME] Decreasing size of gamm4 model output (multiple GB when saved to .rds)

Meaghan Rupprecht rupprecht @end|ng |rom unbc@c@
Mon Sep 18 07:10:08 CEST 2023


I am running a Generalized Additive Mixed Model with the R package, gamm4. Each model output includes a mer object and a gam object. I need to compare 26 model structures based on a combination of variables and then conduct model averaging on the best models based on AIC.
The problem is, each .rds file with model output is approximately 5GB. For all 26 models, there is no way I can load them into my R environment for any kind of model comparison or averaging. Similar models run with mgcv::gamm() were only 5.7 MB, which is a much more manageable size for comparisons. (Note: unfortunately I have to stay within the gamm4 package based on model structure, otherwise I would use the mgcv model outputs).
Is there a way to decrease the size of the .rds file to a more reasonable size? Are there arguments within gamm4 or lme4 that could reduce the amount of extra information retained within the model?


	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list