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

David Winsemius dw|n@em|u@ @end|ng |rom comc@@t@net
Tue Sep 19 04:24:35 CEST 2023


I was puzzled by the fact that you save the output as an rds file. I suspect but am unable to confirm, that your result(s) include some representation of the data. You might instead return the models with the data omitted  

— 
David. 

Sent from my iPhone

> On Sep 17, 2023, at 10:11 PM, Meaghan Rupprecht <rupprecht using unbc.ca> wrote:
> 
> 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]]
> 
> _______________________________________________
> R-sig-mixed-models using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models



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