I am estimating a large number of models (lm-type, but possibly others) in r. I do this ion a secure server, from which data export is restricted. I am allowed to export the results from models (coefficients, statistics) but not the individual-level data.
I could prepare an object that only includes relevant statistics from the objects and export this. However, it would be very useful if I could export the model objects themselves without the data but at the same time retaining functionality to predict new data, tidy results with broom
etc.
I have tried to run, given m being an lm-type object: m$model <- NULL
but this does not let me use e.g. broom::confint_tidy afterwards
.
Is there way possible to make my objects data-free and at the same time preserve functionality?