statsmodels.stats.proportion._score_confint_inversion¶
-
statsmodels.stats.proportion._score_confint_inversion(count1, nobs1, count2, nobs2, compare=
'diff'
, alpha=0.05
, correction=True
)[source]¶ Compute score confidence interval by inverting score test
- Parameters:¶
- count1, nobs1
Count and sample size for first sample.
- count2, nobs2
Count and sample size for the second sample.
- compare
str
in
[‘diff’, ‘ratio’ ‘odds-ratio’] If compare is diff, then the confidence interval is for diff = p1 - p2. If compare is ratio, then the confidence interval is for the risk ratio defined by ratio = p1 / p2. If compare is odds-ratio, then the confidence interval is for the odds-ratio defined by or = p1 / (1 - p1) / (p2 / (1 - p2).
- alpha
float
in
interval
(0,1) Significance level, e.g. 0.05, is the probability of a type I error, that is wrong rejections if the Null Hypothesis is true.
- correctionbool
If correction is True (default), then the Miettinen and Nurminen small sample correction to the variance nobs / (nobs - 1) is used. Applies only if method=’score’.
- Returns:¶
Last update:
Oct 03, 2024