title: Length of endogenous variable must be larger the the number of lags used
body: <p>I was recently following this tutorial  on Time Series Analysis in Python by Susan Li. I am fitting a time series SARIMAX model on the following series:</p>
  <pre class="lang-py prettyprint-override"><code>y['2017':]
  
  OUT: 
  Order Date
  2017-01-01     397.602133
  2017-02-01     528.179800
  2017-03-01     544.672240
  2017-04-01     453.297905
  2017-05-01     678.302328
  2017-06-01     826.460291
  2017-07-01     562.524857
  2017-08-01     857.881889
  2017-09-01    1209.508583
  2017-10-01     875.362728
  2017-11-01    1277.817759
  2017-12-01    1256.298672
  Freq: MS, Name: Sales, dtype: float64
  </code></pre>
  <p>using the following:</p>
  <pre class="lang-py prettyprint-override"><code>mod = sm.tsa.statespace.SARIMAX(y,
                                  order=(1, 1, 1),
                                  seasonal_order=(1, 1, 0, 12),
                                  enforce_stationarity=False,
                                  enforce_invertibility=False)
  
  results = mod.fit()
  
  print(results.summary().tables[1])
  </code></pre>
  <p>Now, this works well until here, but then when I try to visualize the results, I obtain the following error:</p>
  <pre class="lang-py prettyprint-override"><code>results.plot_diagnostics(figsize=(16, 8))
  </code></pre>
  <pre><code>OUT: 
  ValueError                                Traceback (most recent call last)
  &lt;ipython-input-16-6cfeaa52b7c1&gt; in &lt;module&gt;
  ----&gt; 1 results.plot_diagnostics(figsize=(16, 8))
        2 plt.show()
  
  ~/opt/anaconda3/lib/python3.8/site-packages/statsmodels/tsa/statespace/mlemodel.py in plot_diagnostics(self, variable, lags, fig, figsize, truncate_endog_names)
     4282 
     4283         if resid.shape[0] &lt; max(d, lags):
  -&gt; 4284             raise ValueError(
     4285                 &quot;Length of endogenous variable must be larger the the number &quot;
     4286                 &quot;of lags used in the model and the number of observations &quot;
  
  ValueError: Length of endogenous variable must be larger the the number of lags used in the model and the number of observations burned in the log-likelihood calculation.
  
  &lt;Figure size 1152x576 with 0 Axes&gt;
  </code></pre>
  <p>Does anyone have any idea how to fix this, if it's some kind of library error, and if it cannot directly fixed, then how can I obtain all the diagnostic plots?</p>