Learn R Programming

pammtools (version 0.8.1)

strip_pamm_fit: 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)

Value

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

Arguments

fit

A fitted pamm/gam object.