0

Some researchers say that they compared their method with "The natural multidimensional extension of the Wilson score method".

Chafai, D. and Concordet, D., 2009. Confidence regions for the multinomial parameter with small sample size. Journal of the American Statistical Association, 104(487), pp.1071-1079.

In R there is the function MultinomCI():

MultinomCI(x, method = "wilson"))

The binomial Wilson interval is:

$$\frac{n_s + \frac{z^2}{2}}{n+z^2} \pm \frac{z}{n+z^2}\sqrt{\frac{n_s n_f}{n}+\frac{z^2}{4}}$$

Is there an equivalent equation for the multinomial Wilson interval, please?

MarianD
  • 1,535
  • 2
  • 11
  • 18
R. Cox
  • 179

1 Answers1

1

It's just the same equation for multinominal as it is for binomial.

In Python:

import numpy as np
import rpy2.robjects as ro
from rpy2.robjects.packages import importr
import statsmodels.api

package_name = "DescTools"

try: pkg = importr(package_name) except: ro.r(f'install.packages("{package_name}")') pkg = importr(package_name) pkg

r_string = """CI = MultinomCI(c(11,0,6,11), conf.level=0.95, method="wilson") """ ro.r(r_string) CL = np.array(ro.r['CI']) print('Multinominal',CL[0][1:3])

low, high = statsmodels.stats.proportion.proportion_confint(11, sum([11,0,6,11]), alpha=1-0.95, method='wilson') print('Binomial ',[low, high])

Gives:

Multinominal [0.23565687 0.57590956]
Binomial     [0.2356568654157959, 0.5759095570340281]
R. Cox
  • 179