class_docstr: State space representation of a time series process, with Kalman filter
  and smoother.
  
  Parameters
  ----------
  k_endog : {array_like, int}
      The observed time-series process :math:`y` if array like or the
      number of variables in the process if an integer.
  k_states : int
      The dimension of the unobserved state process.
  k_posdef : int, optional
      The dimension of a guaranteed positive definite covariance matrix
      describing the shocks in the measurement equation. Must be less than
      or equal to `k_states`. Default is `k_states`.
  results_class : class, optional
      Default results class to use to save filtering output. Default is
      `SmootherResults`. If specified, class must extend from
      `SmootherResults`.
  **kwargs
      Keyword arguments may be used to provide default values for state space
      matrices, for Kalman filtering options, or for Kalman smoothing
      options. See `Representation` for more details.
docstr: Set the smoother output
  
  The smoother can produce several types of results. The smoother output
  variable controls which are calculated and returned.
  
  Parameters
  ----------
  smoother_output : int, optional
      Bitmask value to set the smoother output to. See notes for details.
  **kwargs
      Keyword arguments may be used to influence the smoother output by
      setting individual boolean flags. See notes for details.
  
  Notes
  -----
  The smoother output is defined by a collection of boolean flags, and
  is internally stored as a bitmask. The methods available are:
  
  SMOOTHER_STATE = 0x01
      Calculate and return the smoothed states.
  SMOOTHER_STATE_COV = 0x02
      Calculate and return the smoothed state covariance matrices.
  SMOOTHER_STATE_AUTOCOV = 0x10
      Calculate and return the smoothed state lag-one autocovariance
      matrices.
  SMOOTHER_DISTURBANCE = 0x04
      Calculate and return the smoothed state and observation
      disturbances.
  SMOOTHER_DISTURBANCE_COV = 0x08
      Calculate and return the covariance matrices for the smoothed state
      and observation disturbances.
  SMOOTHER_ALL
      Calculate and return all results.
  
  If the bitmask is set directly via the `smoother_output` argument, then
  the full method must be provided.
  
  If keyword arguments are used to set individual boolean flags, then
  the lowercase of the method must be used as an argument name, and the
  value is the desired value of the boolean flag (True or False).
  
  Note that the smoother output may also be specified by directly
  modifying the class attributes which are defined similarly to the
  keyword arguments.
  
  The default smoother output is SMOOTHER_ALL.
  
  If performance is a concern, only those results which are needed should
  be specified as any results that are not specified will not be
  calculated. For example, if the smoother output is set to only include
  SMOOTHER_STATE, the smoother operates much more quickly than if all
  output is required.
  
  Examples
  --------
  >>> import statsmodels.tsa.statespace.kalman_smoother as ks
  >>> mod = ks.KalmanSmoother(1,1)
  >>> mod.smoother_output
  15
  >>> mod.set_smoother_output(smoother_output=0)
  >>> mod.smoother_state = True
  >>> mod.smoother_output
  1
  >>> mod.smoother_state
  True
docstr_tok: ["Set","the","smoother","output","The","smoother","can","produce","several","types","of","results",".","The","smoother","output","variable","controls","which","are","calculated","and","returned",".","Parameters","--","--","--","--","--","smoother_output",":","int",",","optional","Bitmask","value","to","set","the","smoother","output","to",".","See","notes","for","details",".","*","*","kwargs","Keyword","arguments","may","be","used","to","influence","the","smoother","output","by","setting","individual","boolean","flags",".","See","notes","for","details",".","Notes","--","--","-","The","smoother","output","is","defined","by","a","collection","of","boolean","flags",",","and","is","internally","stored","as","a","bitmask",".","The","methods","available","are",":","SMOOTHER_STATE","=","0x01","Calculate","and","return","the","smoothed","states",".","SMOOTHER_STATE_COV","=","0x02","Calculate","and","return","the","smoothed","state","covariance","matrices",".","SMOOTHER_STATE_AUTOCOV","=","0x10","Calculate","and","return","the","smoothed","state","lag-one","autocovariance","matrices",".","SMOOTHER_DISTURBANCE","=","0x04","Calculate","and","return","the","smoothed","state","and","observation","disturbances",".","SMOOTHER_DISTURBANCE_COV","=","0x08","Calculate","and","return","the","covariance","matrices","for","the","smoothed","state","and","observation","disturbances",".","SMOOTHER_ALL","Calculate","and","return","all","results",".","If","the","bitmask","is","set","directly","via","the","`","smoother_output","`","argument",",","then","the","full","method","must","be","provided",".","If","keyword","arguments","are","used","to","set","individual","boolean","flags",",","then","the","lowercase","of","the","method","must","be","used","as","an","argument","name",",","and","the","value","is","the","desired","value","of","the","boolean","flag","(","True","or","False",")",".","Note","that","the","smoother","output","may","also","be","specified","by","directly","modifying","the","class","attributes","which","are","defined","similarly","to","the","keyword","arguments",".","The","default","smoother","output","is","SMOOTHER_ALL",".","If","performance","is","a","concern",",","only","those","results","which","are","needed","should","be","specified","as","any","results","that","are","not","specified","will","not","be","calculated",".","For","example",",","if","the","smoother","output","is","set","to","only","include","SMOOTHER_STATE",",","the","smoother","operates","much","more","quickly","than","if","all","output","is","required",".","Examples","--","--","--","--",">",">",">","import","statsmodels.tsa.statespace.kalman_smoother","as","ks",">",">",">","mod","=","ks.KalmanSmoother","(","1,1",")",">",">",">","mod.smoother_output","15",">",">",">","mod.set_smoother_output","(","smoother_output=0",")",">",">",">","mod.smoother_state","=","True",">",">",">","mod.smoother_output","1",">",">",">","mod.smoother_state","True"]
code: def set_smoother_output(self, smoother_output=None, **kwargs):
      """
      Set the smoother output
  
      The smoother can produce several types of results. The smoother output
      variable controls which are calculated and returned.
  
      Parameters
      ----------
      smoother_output : int, optional
          Bitmask value to set the smoother output to. See notes for details.
      **kwargs
          Keyword arguments may be used to influence the smoother output by
          setting individual boolean flags. See notes for details.
  
      Notes
      -----
      The smoother output is defined by a collection of boolean flags, and
      is internally stored as a bitmask. The methods available are:
  
      SMOOTHER_STATE = 0x01
          Calculate and return the smoothed states.
      SMOOTHER_STATE_COV = 0x02
          Calculate and return the smoothed state covariance matrices.
      SMOOTHER_STATE_AUTOCOV = 0x10
          Calculate and return the smoothed state lag-one autocovariance
          matrices.
      SMOOTHER_DISTURBANCE = 0x04
          Calculate and return the smoothed state and observation
          disturbances.
      SMOOTHER_DISTURBANCE_COV = 0x08
          Calculate and return the covariance matrices for the smoothed state
          and observation disturbances.
      SMOOTHER_ALL
          Calculate and return all results.
  
      If the bitmask is set directly via the `smoother_output` argument, then
      the full method must be provided.
  
      If keyword arguments are used to set individual boolean flags, then
      the lowercase of the method must be used as an argument name, and the
      value is the desired value of the boolean flag (True or False).
  
      Note that the smoother output may also be specified by directly
      modifying the class attributes which are defined similarly to the
      keyword arguments.
  
      The default smoother output is SMOOTHER_ALL.
  
      If performance is a concern, only those results which are needed should
      be specified as any results that are not specified will not be
      calculated. For example, if the smoother output is set to only include
      SMOOTHER_STATE, the smoother operates much more quickly than if all
      output is required.
  
      Examples
      --------
      >>> import statsmodels.tsa.statespace.kalman_smoother as ks
      >>> mod = ks.KalmanSmoother(1,1)
      >>> mod.smoother_output
      15
      >>> mod.set_smoother_output(smoother_output=0)
      >>> mod.smoother_state = True
      >>> mod.smoother_output
      1
      >>> mod.smoother_state
      True
      """
      if smoother_output is not None:
          self.smoother_output = smoother_output
      for name in KalmanSmoother.smoother_outputs:
          if name in kwargs:
              setattr(self, name, kwargs[name])
  
imports: import numpy
  from types import SimpleNamespace
  from statsmodels.tsa.statespace.representation import OptionWrapper
  from statsmodels.tsa.statespace.kalman_filter import KalmanFilter, FilterResults
  from statsmodels.tsa.statespace.tools import reorder_missing_matrix, reorder_missing_vector, copy_index_matrix
  from statsmodels.tsa.statespace import tools, initialization
label_desc: Use image node_id 5 for calling the KalmanSmoother obj's underlying member method code with example usage: obj.set_smoother_output(smoother_output) without return types