strip_pamm_fit: Slim down a fitted PAMM for storage inside a 'pamm_ic' object

View source: R/pamm-ic-pool.R

strip_pamm_fitR Documentation

Slim down a fitted PAMM for storage inside a pamm_ic object

Description

Removes the per-observation slots (model frame, fitted values, residuals, working weights, ...) and the call (which captures the full PED data), none of which are needed for the downstream multiple-imputation pooling: the pooled add_* methods only require each fit's coefficients, Vp/Ve and the smooth/parametric structure used by predict(type = "lpmatrix"). Stripping makes the stored size independent of the data set size, so memory does not blow up with many imputations.

Usage

strip_pamm_fit(fit)

Arguments

fit

A fitted pamm/gam object.

Value

The same object with large per-observation slots removed; class and everything needed for predict/coef/vcov are retained.


pammtools documentation built on Aug. 27, 2026, 1:08 a.m.