Open jyuu opened 4 years ago
Code to reduce the size of a model object from lfe::felm():
small_felm <- function(m){ m$fe <- NULL m$residuals <- NULL m$r.residuals <- NULL m$fitted.values <- NULL m$response <- NULL m$cfactor <- NULL m$inv <- NULL m$STATS$promotion <- NULL m$clustervar <- NULL m }
Thanks to @adamlauretig
Just a note, you'll probably want to pass keepX = FALSE, keepCX = FALSE to the felm when you're fitting the model, if possible.
keepX = FALSE, keepCX = FALSE
felm
Code to reduce the size of a model object from lfe::felm():
small_felm <- function(m){ m$fe <- NULL m$residuals <- NULL m$r.residuals <- NULL m$fitted.values <- NULL m$response <- NULL m$cfactor <- NULL m$inv <- NULL m$STATS$promotion <- NULL m$clustervar <- NULL m }
Thanks to @adamlauretig