Access fitted models #416
-
In some cases I'd like to have access to the fitted models. For instance, to pass the model to other packages like |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
thanks for the question, @lorenzoFabbri -- the short answer is that the fitted model object is unlikely to be preserved at the level that |
Beta Was this translation helpful? Give feedback.
thanks for the question, @lorenzoFabbri -- the short answer is that the fitted model object is unlikely to be preserved at the level that
marginaleffects
might require. you'll see just after the line that you point to that the S3 class thatglm
returns is stripped of much of its contents (https://github.com/tlverse/sl3/blob/devel/R/Lrnr_glm.R#L94-L104). this is done so as to minimize the memory footprint of the fitted model objects (of which there may be very many in a large stack)