

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>statsmodels.base.model.GenericLikelihoodModelResults.remove_data &#8212; statsmodels v0.10.0 documentation</title>
    <link rel="stylesheet" href="../../_static/nature.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" type="text/css" href="../../_static/graphviz.css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <script type="text/javascript" src="../../_static/language_data.js"></script>
    <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <link rel="shortcut icon" href="../../_static/statsmodels_hybi_favico.ico"/>
    <link rel="author" title="About these documents" href="../../about.html" />
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="statsmodels.base.model.GenericLikelihoodModelResults.save" href="statsmodels.base.model.GenericLikelihoodModelResults.save.html" />
    <link rel="prev" title="statsmodels.base.model.GenericLikelihoodModelResults.pvalues" href="statsmodels.base.model.GenericLikelihoodModelResults.pvalues.html" />
<link rel="stylesheet" href="../../_static/examples.css" type="text/css" />
<link rel="stylesheet" href="../../_static/facebox.css" type="text/css" />
<script type="text/javascript" src="../../_static/scripts.js">
</script>
<script type="text/javascript" src="../../_static/facebox.js">
</script>
<script type="text/javascript">
$.facebox.settings.closeImage = "../../_static/closelabel.png"
$.facebox.settings.loadingImage = "../../_static/loading.gif"
</script>

<script>
$(document).ready(function() {
  $.getJSON("../../../versions.json", function(versions) {
    var dropdown = document.createElement("div");
    dropdown.className = "dropdown";
    var button = document.createElement("button");
    button.className = "dropbtn";
    button.innerHTML = "Other Versions";
    var content = document.createElement("div");
    content.className = "dropdown-content";
    dropdown.appendChild(button);
    dropdown.appendChild(content);
    $(".header").prepend(dropdown);
    for (var i = 0; i < versions.length; i++) {
      if (versions[i].substring(0, 1) == "v") {
        versions[i] = [versions[i], versions[i].substring(1)];
      } else {
        versions[i] = [versions[i], versions[i]];
      };
    };
    for (var i = 0; i < versions.length; i++) {
      var a = document.createElement("a");
      a.innerHTML = versions[i][1];
      a.href = "../../../" + versions[i][0] + "/index.html";
      a.title = versions[i][1];
      $(".dropdown-content").append(a);
    };
  });
});
</script>


  </head><body>
<div class="headerwrap">
    <div class = "header">
        
        <a href = "../../index.html">
<img src="../../_static/statsmodels_hybi_banner.png" alt="Logo"
    style="padding-left: 15px"/></a>
        
    </div>
</div>

    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="statsmodels.base.model.GenericLikelihoodModelResults.save.html" title="statsmodels.base.model.GenericLikelihoodModelResults.save"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="statsmodels.base.model.GenericLikelihoodModelResults.pvalues.html" title="statsmodels.base.model.GenericLikelihoodModelResults.pvalues"
             accesskey="P">previous</a> |</li>
<li><a href ="../../install.html">Install</a></li> &nbsp;|&nbsp;
<li><a href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">Support</a></li> &nbsp;|&nbsp;
<li><a href="https://github.com/statsmodels/statsmodels/issues">Bugs</a></li> &nbsp;|&nbsp;
<li><a href="../index.html">Develop</a></li> &nbsp;|&nbsp;
<li><a href="../../examples/index.html">Examples</a></li> &nbsp;|&nbsp;
<li><a href="../../faq.html">FAQ</a></li> &nbsp;|&nbsp;

          <li class="nav-item nav-item-1"><a href="../index.html" >Developer Page</a> |</li>
          <li class="nav-item nav-item-2"><a href="../internal.html" >Internal Classes</a> |</li>
          <li class="nav-item nav-item-3"><a href="statsmodels.base.model.GenericLikelihoodModelResults.html" accesskey="U">statsmodels.base.model.GenericLikelihoodModelResults</a> |</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            




  <div class="section" id="statsmodels-base-model-genericlikelihoodmodelresults-remove-data">
<h1>statsmodels.base.model.GenericLikelihoodModelResults.remove_data<a class="headerlink" href="#statsmodels-base-model-genericlikelihoodmodelresults-remove-data" title="Permalink to this headline">¶</a></h1>
<p>method</p>
<dl class="method">
<dt id="statsmodels.base.model.GenericLikelihoodModelResults.remove_data">
<code class="sig-prename descclassname">GenericLikelihoodModelResults.</code><code class="sig-name descname">remove_data</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#statsmodels.base.model.GenericLikelihoodModelResults.remove_data" title="Permalink to this definition">¶</a></dt>
<dd><p>remove data arrays, all nobs arrays from result and model</p>
<p>This reduces the size of the instance, so it can be pickled with less
memory. Currently tested for use with predict from an unpickled
results and model instance.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Since data and some intermediate results have been removed
calculating new statistics that require them will raise exceptions.
The exception will occur the first time an attribute is accessed
that has been set to None.</p>
</div>
<p>Not fully tested for time series models, tsa, and might delete too much
for prediction or not all that would be possible.</p>
<p>The lists of arrays to delete are maintained as attributes of
the result and model instance, except for cached values. These
lists could be changed before calling remove_data.</p>
<p>The attributes to remove are named in:</p>
<dl class="simple">
<dt>model._data_attr<span class="classifier">arrays attached to both the model instance</span></dt><dd><p>and the results instance with the same attribute name.</p>
</dd>
<dt>result.data_in_cache<span class="classifier">arrays that may exist as values in</span></dt><dd><p>result._cache (TODO : should privatize name)</p>
</dd>
<dt>result._data_attr_model<span class="classifier">arrays attached to the model</span></dt><dd><p>instance but not to the results instance</p>
</dd>
</dl>
</dd></dl>

</div>





          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h4>Previous topic</h4>
  <p class="topless"><a href="statsmodels.base.model.GenericLikelihoodModelResults.pvalues.html"
                        title="previous chapter">statsmodels.base.model.GenericLikelihoodModelResults.pvalues</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="statsmodels.base.model.GenericLikelihoodModelResults.save.html"
                        title="next chapter">statsmodels.base.model.GenericLikelihoodModelResults.save</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../../_sources/dev/generated/statsmodels.base.model.GenericLikelihoodModelResults.remove_data.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2.
    </div>
  </body>
</html>