class_docstr: Class to hold results from fitting a recursive least squares model.
  
  Parameters
  ----------
  model : RecursiveLS instance
      The fitted model instance
  
  Attributes
  ----------
  specification : dictionary
      Dictionary including all attributes from the recursive least squares
      model instance.
  
  See Also
  --------
  statsmodels.tsa.statespace.kalman_filter.FilterResults
  statsmodels.tsa.statespace.mlemodel.MLEResults
class_docstr_tok: ["Class","to","hold","results","from","fitting","a","recursive","least","squares","model",".","Parameters","--","--","--","--","--","model",":","RecursiveLS","instance","The","fitted","model","instance","Attributes","--","--","--","--","--","specification",":","dictionary","Dictionary","including","all","attributes","from","the","recursive","least","squares","model","instance",".","See","Also","--","--","--","--","statsmodels.tsa.statespace.kalman_filter.FilterResults","statsmodels.tsa.statespace.mlemodel.MLEResults"]
docstr: Plot the CUSUM statistic and significance bounds.
  
  Parameters
  ----------
  alpha : float, optional
      The plotted significance bounds are alpha %.
  legend_loc : str, optional
      The location of the legend in the plot. Default is upper left.
  fig : Figure, optional
      If given, subplots are created in this figure instead of in a new
      figure. Note that the grid will be created in the provided
      figure using `fig.add_subplot()`.
  figsize : tuple, optional
      If a figure is created, this argument allows specifying a size.
      The tuple is (width, height).
  
  Notes
  -----
  Evidence of parameter instability may be found if the CUSUM statistic
  moves out of the significance bounds.
  
  References
  ----------
  .. [*] Brown, R. L., J. Durbin, and J. M. Evans. 1975.
     "Techniques for Testing the Constancy of
     Regression Relationships over Time."
     Journal of the Royal Statistical Society.
     Series B (Methodological) 37 (2): 149-92.
docstr_tok: ["Plot","the","CUSUM","statistic","and","significance","bounds",".","Parameters","--","--","--","--","--","alpha",":","float",",","optional","The","plotted","significance","bounds","are","alpha","%",".","legend_loc",":","str",",","optional","The","location","of","the","legend","in","the","plot",".","Default","is","upper","left",".","fig",":","Figure",",","optional","If","given",",","subplots","are","created","in","this","figure","instead","of","in","a","new","figure",".","Note","that","the","grid","will","be","created","in","the","provided","figure","using","`","fig.add_subplot","(",")","`",".","figsize",":","tuple",",","optional","If","a","figure","is","created",",","this","argument","allows","specifying","a","size",".","The","tuple","is","(","width",",","height",")",".","Notes","--","--","-","Evidence","of","parameter","instability","may","be","found","if","the","CUSUM","statistic","moves","out","of","the","significance","bounds",".","References","--","--","--","--","--","..","[","*","]","Brown",",","R.","L.",",","J.","Durbin",",","and","J.","M.","Evans",".","1975",".","``","Techniques","for","Testing","the","Constancy","of","Regression","Relationships","over","Time",".","''","Journal","of","the","Royal","Statistical","Society",".","Series","B","(","Methodological",")","37","(","2",")",":","149-92","."]
code: def plot_cusum(
      self, alpha=0.05, legend_loc="upper left", fig=None, figsize=None
  ):
      r"""
      Plot the CUSUM statistic and significance bounds.
  
      Parameters
      ----------
      alpha : float, optional
          The plotted significance bounds are alpha %.
      legend_loc : str, optional
          The location of the legend in the plot. Default is upper left.
      fig : Figure, optional
          If given, subplots are created in this figure instead of in a new
          figure. Note that the grid will be created in the provided
          figure using `fig.add_subplot()`.
      figsize : tuple, optional
          If a figure is created, this argument allows specifying a size.
          The tuple is (width, height).
  
      Notes
      -----
      Evidence of parameter instability may be found if the CUSUM statistic
      moves out of the significance bounds.
  
      References
      ----------
      .. [*] Brown, R. L., J. Durbin, and J. M. Evans. 1975.
         "Techniques for Testing the Constancy of
         Regression Relationships over Time."
         Journal of the Royal Statistical Society.
         Series B (Methodological) 37 (2): 149-92.
      """
      # Create the plot
      from statsmodels.graphics.utils import _import_mpl, create_mpl_fig
  
      _import_mpl()
      fig = create_mpl_fig(fig, figsize)
      ax = fig.add_subplot(1, 1, 1)
  
      # Get dates, if applicable
      if hasattr(self.data, "dates") and self.data.dates is not None:
          dates = self.data.dates._mpl_repr()
      else:
          dates = np.arange(self.nobs)
      d = max(self.nobs_diffuse, self.loglikelihood_burn)
  
      # Plot cusum series and reference line
      ax.plot(dates[d:], self.cusum, label="CUSUM")
      ax.hlines(0, dates[d], dates[-1], color="k", alpha=0.3)
  
      # Plot significance bounds
      lower_line, upper_line = self._cusum_significance_bounds(alpha)
      ax.plot(
          [dates[d], dates[-1]],
          upper_line,
          "k--",
          label="%d%% significance" % (alpha * 100),
      )
      ax.plot([dates[d], dates[-1]], lower_line, "k--")
  
      ax.legend(loc=legend_loc)
  
      return fig
  
imports: import numpy
  import pandas
  from statsmodels.compat.pandas import Appender
  from statsmodels.tools.data import _is_using_pandas
  from statsmodels.tsa.statespace.mlemodel import MLEModel, MLEResults, MLEResultsWrapper, PredictionResults, PredictionResultsWrapper
  from statsmodels.tsa.statespace.tools import concat
  from statsmodels.tools.tools import Bunch
  from statsmodels.tools.decorators import cache_readonly
  import statsmodels.base.wrapper
label_desc: Use image node_id 19 for calling the RecursiveLSResults obj's underlying member method code with example usage: obj.plot_cusum(alpha, legend_loc, fig, figsize) and returns: fig