code: def test_confint_2indep_propcis():
      # unit tests compared to R package PropCis
      # alpha = 0.05
      count1, nobs1 = 7, 34
      count2, nobs2 = 1, 34
  
      # > library(PropCIs)
      # > diffscoreci(7, 34, 1, 34, 0.95)
      ci = 0.0270416, 0.3452912
      ci1 = confint_proportions_2indep(
          count1,
          nobs1,
          count2,
          nobs2,
          compare="diff",
          method="score",
          correction=True,
      )
      assert_allclose(
          ci1, ci, atol=0.002
      )  # lower agreement (iterative)
      # > wald2ci(7, 34, 1, 34, 0.95, adjust="AC")
      ci = 0.01161167, 0.32172166
      ci1 = confint_proportions_2indep(
          count1,
          nobs1,
          count2,
          nobs2,
          compare="diff",
          method="agresti-caffo",
      )
      assert_allclose(ci1, ci, atol=6e-7)
      # > wald2ci(7, 34, 1, 34, 0.95, adjust="Wald")
      ci = 0.02916942, 0.32377176
      ci1 = confint_proportions_2indep(
          count1,
          nobs1,
          count2,
          nobs2,
          compare="diff",
          method="wald",
          correction=False,
      )
      assert_allclose(ci1, ci, atol=6e-7)
  
      # > orscoreci(7, 34, 1, 34, 0.95)
      ci = 1.246309, 56.486130
      ci1 = confint_proportions_2indep(
          count1,
          nobs1,
          count2,
          nobs2,
          compare="odds-ratio",
          method="score",
          correction=True,
      )
      assert_allclose(ci1, ci, rtol=5e-4)  # lower agreement (iterative)
  
      # > riskscoreci(7, 34, 1, 34, 0.95)
      ci = 1.220853, 42.575718
      ci1 = confint_proportions_2indep(
          count1,
          nobs1,
          count2,
          nobs2,
          compare="ratio",
          method="score",
          correction=False,
      )
      assert_allclose(ci1, ci, atol=6e-7)
  
imports: import warnings
  import numpy
  from numpy.testing import assert_allclose, assert_almost_equal, assert_array_less, assert_equal, assert_raises
  import pandas
  import pytest
  import statsmodels.stats.proportion
  from statsmodels.stats.proportion import confint_proportions_2indep, multinomial_proportions_confint, power_proportions_2indep, proportion_confint, samplesize_proportions_2indep_onetail, score_test_proportions_2indep
  from statsmodels.tools.sm_exceptions import HypothesisTestWarning
  from statsmodels.tools.testing import Holder
  from statsmodels.stats.tests.results.results_proportion import res_binom, res_binom_methods
label_desc: Use image node_id 17 for calling a global function with example usage: test_confint_2indep_propcis() without return types