mqr.inference.proportion.
confint_2sample#
- mqr.inference.proportion.confint_2sample(count1, nobs1, count2, nobs2, conf=0.95, bounded='both', method='newcomb-cc')#
Confidence interval for difference between proportions count1 / nobs1 - count2 / nobs2.
- Parameters:
- count1int
Number of “true” observations in first sample.
- nobs1int
Total observations in first sample.
- count2int
Number of “true” observations in second sample.
- nobs2int
Total observations in second sample.
- conffloat, optional
Confidence level that determines the width of the interval.
- bounded{‘both’, ‘below’, ‘above’}, optional
Which sides of the interval to close.
- method{‘agresti-caffo’, ‘newcomb’, ‘newcomb-cc’}, optional
- ‘agresti-caffo’ (or ‘adj-wald’)Agresti-caffo method an adjusted normal approximation. See reference [1].‘newcomb’A method presented by Newcomb as method 10 in [2].‘newcomb-cc’Continuity-corrected version of ‘newcomb’; method 11 in [2].(other)Everything else is passed to
sm..confint_proportions_2indep
for comparison of the difference.
- Returns:
References
[1]Agresti, A., & Caffo, B. (2000). Simple and effective confidence intervals for proportions and differences of proportions result from adding two successes and two failures. The American Statistician, 54(4), 280-288.