statsmodels/statsmodels — pull request #178 by josef-pkt (2012-03-13 03:07:57+00:00)
Title: Remove data for pickling and predict

extra change included: add predict to RLM

this adds a remove_data to the result classes that sets all arrays of length nobs to None

see issue #176

status: tested with OLS, Poisson, Logit, RLM (default), GLM (default)

test is that pickle file has less than 10000 characters

remove_data is in LikelihoodResults, but I haven't checked all subclasses, especially I didn't check TSA
for non-covered models it might not wipe completely (e.g. weights in WLS, MultinomialLogit?, ...)

The implementation works with two generic lists of attribute names, model._data_attr and result._data_attr,
and some special cases in subclasses.

needs docstrings in subclasses

-----
for pickle (pickle branch)
the only specific problem is in the callback in discrete_model
results._results pickles, but not the wrapper
no problems with cache (after calling summary)