code: def test_wald(self):
      res1 = self.res1
      res2 = self.res2
      k1 = len(res1.params)
      k2 = len(res2.params)
  
      use_f = False
      with warnings.catch_warnings():
          warnings.simplefilter("ignore", ValueWarning)
          wt2 = res2.wald_test(np.eye(k2)[1:], use_f=use_f, scalar=True)
          wt1 = res1.wald_test(np.eye(k1)[1:], use_f=use_f, scalar=True)
      assert_allclose(wt2.pvalue, wt1.pvalue, atol=1e-20)  # pvalue = 0
      assert_allclose(wt2.statistic, wt1.statistic, rtol=1e-8)
      assert_equal(wt2.df_denom, wt1.df_denom)
  
      use_f = True
      with warnings.catch_warnings():
          warnings.simplefilter("ignore", ValueWarning)
          wt2 = res2.wald_test(np.eye(k2)[1:], use_f=use_f, scalar=True)
          wt1 = res1.wald_test(np.eye(k1)[1:], use_f=use_f, scalar=True)
      assert_allclose(wt2.pvalue, wt1.pvalue, rtol=1)  # pvalue = 8e-273
      assert_allclose(wt2.statistic, wt1.statistic, rtol=1e-8)
      assert_equal(wt2.df_denom, wt1.df_denom)
      assert_equal(wt2.df_num, wt1.df_num)
      assert_equal(wt2.summary()[-30:], wt1.summary()[-30:])
  
      # smoke
      with warnings.catch_warnings():
          # RuntimeWarnings because of truedivide and scipy distributions
          # Future to silence BIC warning
          warnings.simplefilter("ignore", FutureWarning)
          warnings.simplefilter("ignore", ValueWarning)
          warnings.simplefilter("ignore", RuntimeWarning)
          self.res1.summary()
          self.res1.summary2()
  
imports: import warnings
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  from statsmodels.genmod.families import family
  from statsmodels.genmod.generalized_linear_model import GLM
  from statsmodels.regression.linear_model import OLS, WLS
  from statsmodels.tools.sm_exceptions import ValueWarning
  from statsmodels.tools.tools import add_constant
label_desc: Use image node_id 5 for calling the TestGLMBinomialCountConstrained obj's underlying member method code with example usage: obj.test_wald() without return types