class_docstr: Test power.py.
docstr: Test function power_anova.
  Values are compared to the pwr R package.
code: def test_power_anova(self):
      """Test function power_anova.
      Values are compared to the pwr R package.
      """
      eta = 0.0727003
      assert np.isclose(
          power_anova(eta_squared=eta, k=4, n=20), 0.5149793
      )
      assert np.isclose(
          power_anova(eta_squared=eta, n=20, power=0.80), 10.70313
      )
      assert np.isclose(
          power_anova(eta_squared=eta, k=4, power=0.80), 35.75789
      )
      assert np.isclose(
          power_anova(k=4, n=20, power=0.80, alpha=0.05),
          0.1254838,
          rtol=1e-03,
      )
      assert np.isclose(
          power_anova(
              eta_squared=eta, k=4, n=20, power=0.80, alpha=None
          ),
          0.2268337,
      )
      # Error
      with pytest.raises(ValueError):
          power_anova(eta_squared=eta, k=2)
  
file_path: pingouin/pingouin/tests/test_power.py
imports: import pytest
  import numpy
  from unittest import TestCase
  from pingouin.power import power_ttest, power_ttest2n, power_anova, power_rm_anova, power_corr, power_chi2
label_desc: Use image node_id 3 for calling the TestPower obj's underlying member method code with example usage: obj.test_power_anova() without return types