code: def test_effectsize_fstat_stata():
      # reference numbers computed with Stata 14
      # Stata 16 does not seem to have confint for omega2
  
      # esizei 2 40 7.47403193349075, level(90)
      eta2 = 0.2720398648288652
      lb_eta2 = 0.0742092468714613
      ub_eta2 = 0.4156116886974804
      omega2 = 0.2356418580703085
      lb_omega2 = 0.0279197092150344
      ub_omega2 = 0.3863922731323545
      # level = 90
  
      f_stat, df1, df2 = 7.47403193349075, 2, 40
      fes = smo._fstat2effectsize(f_stat, (df1, df2))
      assert_allclose(fes.eta2, eta2, rtol=1e-13)
      assert_allclose(fes.omega2, omega2, rtol=0.02)  # low agreement
      ci_es = smo.confint_effectsize_oneway(
          f_stat, (df1, df2), alpha=0.1
      )
      assert_allclose(ci_es.eta2, (lb_eta2, ub_eta2), rtol=1e-4)
      assert_allclose(
          ci_es.ci_omega2, (lb_omega2, ub_omega2), rtol=0.025
      )
  
imports: import numpy
  from numpy.testing import assert_allclose, assert_equal
  import pytest
  from statsmodels.regression.linear_model import OLS
  import statsmodels.stats.power
  import statsmodels.stats.oneway
  from statsmodels.stats.oneway import confint_effectsize_oneway, confint_noncentrality, effectsize_oneway, anova_oneway, anova_generic, equivalence_oneway, equivalence_oneway_generic, power_equivalence_oneway, _power_equivalence_oneway_emp, f2_to_wellek, fstat_to_wellek, wellek_to_f2
  from statsmodels.stats.robust_compare import scale_transform
  from statsmodels.stats.contrast import wald_test_noncent_generic, wald_test_noncent, _offset_constraint
label_desc: Use image node_id 4 for calling a global function with example usage: test_effectsize_fstat_stata() without return types