class_docstr: Class to hold results from fitting a state space model.
  
  Parameters
  ----------
  model : MLEModel instance
      The fitted model instance
  params : ndarray
      Fitted parameters
  
  Attributes
  ----------
  model : Model instance
      A reference to the model that was fit.
  nobs : float
      The number of observations used to fit the model.
  params : ndarray
      The parameters of the model.
class_docstr_tok: ["Class","to","hold","results","from","fitting","a","state","space","model",".","Parameters","--","--","--","--","--","model",":","MLEModel","instance","The","fitted","model","instance","params",":","ndarray","Fitted","parameters","Attributes","--","--","--","--","--","model",":","Model","instance","A","reference","to","the","model","that","was","fit",".","nobs",":","float","The","number","of","observations","used","to","fit","the","model",".","params",":","ndarray","The","parameters","of","the","model","."]
docstr: Test for normality of standardized residuals.
  
  Null hypothesis is normality.
  
  Parameters
  ----------
  method : {'jarquebera', None}
      The statistical test for normality. Must be 'jarquebera' for
      Jarque-Bera normality test. If None, an attempt is made to select
      an appropriate test.
  
  See Also
  --------
  statsmodels.stats.stattools.jarque_bera
      The Jarque-Bera test of normality.
  
  Notes
  -----
  For statespace models: let `d` = max(loglikelihood_burn, nobs_diffuse);
  this test is calculated ignoring the first `d` residuals.
  
  In the case of missing data, the maintained hypothesis is that the
  data are missing completely at random. This test is then run on the
  standardized residuals excluding those corresponding to missing
  observations.
docstr_tok: ["Test","for","normality","of","standardized","residuals",".","Null","hypothesis","is","normality",".","Parameters","--","--","--","--","--","method",":","{","'jarquebera","'",",","None","}","The","statistical","test","for","normality",".","Must","be","'jarquebera","'","for","Jarque-Bera","normality","test",".","If","None",",","an","attempt","is","made","to","select","an","appropriate","test",".","See","Also","--","--","--","--","statsmodels.stats.stattools.jarque_bera","The","Jarque-Bera","test","of","normality",".","Notes","--","--","-","For","statespace","models",":","let","`","d","`","=","max","(","loglikelihood_burn",",","nobs_diffuse",")",";","this","test","is","calculated","ignoring","the","first","`","d","`","residuals",".","In","the","case","of","missing","data",",","the","maintained","hypothesis","is","that","the","data","are","missing","completely","at","random",".","This","test","is","then","run","on","the","standardized","residuals","excluding","those","corresponding","to","missing","observations","."]
code: def test_normality(self, method):
      """
      Test for normality of standardized residuals.
  
      Null hypothesis is normality.
  
      Parameters
      ----------
      method : {'jarquebera', None}
          The statistical test for normality. Must be 'jarquebera' for
          Jarque-Bera normality test. If None, an attempt is made to select
          an appropriate test.
  
      See Also
      --------
      statsmodels.stats.stattools.jarque_bera
          The Jarque-Bera test of normality.
  
      Notes
      -----
      For statespace models: let `d` = max(loglikelihood_burn, nobs_diffuse);
      this test is calculated ignoring the first `d` residuals.
  
      In the case of missing data, the maintained hypothesis is that the
      data are missing completely at random. This test is then run on the
      standardized residuals excluding those corresponding to missing
      observations.
      """
      if method is None:
          method = "jarquebera"
  
      if self.standardized_forecasts_error is None:
          raise ValueError(
              "Cannot compute test statistic when standardized"
              " forecast errors have not been computed."
          )
  
      if method == "jarquebera":
          from statsmodels.stats.stattools import jarque_bera
  
          if hasattr(self, "loglikelihood_burn"):
              d = np.maximum(self.loglikelihood_burn, self.nobs_diffuse)
          else:
              d = 0
          output = []
          for i in range(self.model.k_endog):
              if hasattr(self, "fiter_results"):
                  resid = (
                      self.filter_results.standardized_forecasts_error[
                          i, d:
                      ]
                  )
              else:
                  resid = self.standardized_forecasts_error
              mask = ~np.isnan(resid)
              output.append(jarque_bera(resid[mask]))
      else:
          raise NotImplementedError("Invalid normality test method.")
  
      return np.array(output)
  
imports: from collections import OrderedDict
  import contextlib
  import warnings
  import numpy
  import pandas
  from scipy.stats import norm
  from statsmodels.base.data import PandasData
  from statsmodels.tools.decorators import cache_readonly
  from statsmodels.tools.eval_measures import aic, aicc, bic, hqic
  from statsmodels.tools.sm_exceptions import PrecisionWarning
  from statsmodels.tools.numdiff import _get_epsilon, approx_fprime, approx_fprime_cs, approx_hess_cs
  from statsmodels.tools.tools import pinv_extended
  import statsmodels.tsa.base.tsa_model
  from statsmodels.tsa.statespace.tools import _safe_cond
label_desc: Use image node_id 21 for calling the StateSpaceMLEResults obj's underlying member method code with example usage: obj.test_normality(method) and returns: np