code: def test_ttest(self):
      # check with linear function against t_test
      res = self.res
      x = res.model.exog
  
      def fun(params):
          return np.dot(x, params)
  
      nl = NonlinearDeltaCov(fun, res.params, res.cov_params())
      predicted = nl.predicted()
      se = nl.se_vectorized()
      assert_allclose(predicted, fun(res.params), rtol=1e-12)
      assert_allclose(se, np.sqrt(np.diag(nl.cov())), rtol=1e-12)
  
      tt = res.t_test(x, use_t=False)
      assert_allclose(predicted, tt.effect, rtol=1e-12)
      assert_allclose(se, tt.sd, rtol=1e-12)
      assert_allclose(nl.conf_int(), tt.conf_int(), rtol=1e-12)
      t1 = nl.summary()
      t2 = tt.summary()
      # equal because nl.summary uses also ContrastResults
      assert_equal(str(t1), str(t2))
  
      # use_t = True
      predicted = nl.predicted()
      se = nl.se_vectorized()
  
      df = res.df_resid
      tt = res.t_test(x, use_t=True)
      assert_allclose(
          nl.conf_int(use_t=True, df=df),
          tt.conf_int(),
          rtol=1e-12,
          atol=1e-10,
      )
      t1 = nl.summary(use_t=True, df=df)
      t2 = tt.summary()
      # equal because nl.summary uses also ContrastResults
      assert_equal(str(t1), str(t2))
  
file_path: statsmodels/statsmodels/stats/tests/test_deltacov.py
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal
  from statsmodels.regression.linear_model import OLS
  from statsmodels.stats._delta_method import NonlinearDeltaCov
label_desc: Use image node_id 3 for calling the TestDeltacovOLS obj's underlying member method code with example usage: obj.test_ttest() and returns: np