code: def test_basic(self):
      res1 = self.res1
      res2 = self.res2
  
      k_mean = 4
      p, se, zv, pv = res2.table_mean.T
      assert_allclose(res1.params[:k_mean], p, rtol=1e-6)
      assert_allclose(res1.bse[:k_mean], se, rtol=1e-6)
      assert_allclose(res1.tvalues[:k_mean], zv, rtol=1e-6)
      assert_allclose(res1.pvalues[:k_mean], pv, rtol=1e-5)
  
      p, se, zv, pv = res2.table_precision.T
      assert_allclose(res1.params[k_mean:], p, rtol=1e-6)
      assert_allclose(res1.bse[k_mean:], se, rtol=1e-6)
      assert_allclose(res1.tvalues[k_mean:], zv, rtol=1e-6)
      assert_allclose(res1.pvalues[k_mean:], pv, rtol=1e-5)
  
      assert_allclose(res1.llf, res2.loglik, rtol=1e-10)
      assert_allclose(res1.aic, res2.aic, rtol=1e-10)
      assert_allclose(res1.bic, res2.bic, rtol=1e-10)
      # dofferent definitions for prsquared
      assert_allclose(res1.prsquared, res2.pseudo_r_squared, atol=0.01)
      assert_equal(res1.df_resid, res2.df_residual)
      assert_equal(res1.nobs, res2.nobs)
  
      # null model compared to R betareg and lmtest
      df_c = res1.df_resid_null - res1.df_resid
      assert_equal(res1.k_null, 2)
  
      # > lrt = lrtest(res_meth_null, res_meth)  # results from R
      pv = 7.21872953868659e-18
      lln = 60.88809589492269
      llf = 104.14802840534323
      chisq = 86.51986502084107
      dfc = 4
      # stats.chi2.sf(86.51986502093865, 4)
      assert_equal(df_c, dfc)
      assert_allclose(res1.llf, llf, rtol=1e-10)
      assert_allclose(res1.llnull, lln, rtol=1e-10)
      assert_allclose(res1.llr, chisq, rtol=1e-10)
      assert_allclose(res1.llr_pvalue, pv, rtol=1e-6)
  
imports: import io
  import os
  import pytest
  import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pandas
  import patsy
  from statsmodels.api import families
  from statsmodels.tools.sm_exceptions import ValueWarning
  from statsmodels.othermod.betareg import BetaModel
  from .results import results_betareg
label_desc: Use image node_id 2 for calling the TestBetaMeth obj's underlying member method code with example usage: obj.test_basic() without return types