code: def test_spec_tests(self):
      # regression test, numbers similar to Monte Carlo simulation
      res_dispersion = np.array(
          [
              [0.1396096387543, 0.8889684245877],
              [0.1396096387543, 0.8889684245877],
              [0.2977840351238, 0.7658680002106],
              [0.1307899995877, 0.8959414342111],
              [0.1307899995877, 0.8959414342111],
              [0.1357101381056, 0.8920504328246],
              [0.2776587511235, 0.7812743277372],
          ]
      )
  
      res_zi = np.array(
          [
              [00.1389582826821, 0.7093188241734],
              [-0.3727710861669, 0.7093188241734],
              [-0.2496729648642, 0.8028402670888],
              [00.0601651553909, 0.8062350958880],
          ]
      )
  
      respoi = Poisson(self.endog, self.exog).fit(disp=0)
      dia = PoissonDiagnostic(respoi)
      t_disp = dia.test_dispersion()
      res_disp = np.column_stack((t_disp.statistic, t_disp.pvalue))
      assert_allclose(res_disp, res_dispersion, rtol=1e-8)
  
      nobs = self.endog.shape[0]
      t_zi_jh = dia.test_poisson_zeroinflation(
          method="broek", exog_infl=np.ones(nobs)
      )
      t_zib = dia.test_poisson_zeroinflation(method="broek")
      t_zim = dia.test_poisson_zeroinflation(method="prob")
      t_zichi2 = dia.test_chisquare_prob(bin_edges=np.arange(3))
  
      t_zi = np.vstack(
          [t_zi_jh[:2], t_zib[:2], t_zim[:2], t_zichi2[:2]]
      )
      assert_allclose(t_zi, res_zi, rtol=1e-8)
  
      # test jansakul and hinde with exog_infl
      t_zi_ex = dia.test_poisson_zeroinflation(
          method="broek", exog_infl=self.exog
      )
      res_zi_ex = np.array([3.7813218150779, 0.1509719973257])
      assert_allclose(t_zi_ex[:2], res_zi_ex, rtol=1e-8)
  
file_path: statsmodels/statsmodels/discrete/tests/test_diagnostic.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from statsmodels.discrete.discrete_model import Poisson
  import statsmodels.discrete._diagnostics_count
  from statsmodels.discrete.diagnostic import PoissonDiagnostic
label_desc: Use image node_id 2 for calling the TestPoissonDiagnosticClass obj's underlying member method code with example usage: obj.test_spec_tests() without return types