Type: Package
Title: Simultaneous Confidence Intervals for Multinomial Proportions
Version: 1.2.1
Date: 2025-10-09
Description: Several authors have proposed methods for constructing simultaneous confidence intervals for multinomial proportions. The package implements seven classical approaches—Wilson, Quesenberry and Hurst, Goodman, Wald (with and without continuity correction), Fitzpatrick and Scott, and Sison and Glaz—along with Bayesian methods based on Dirichlet models. Both equal and unequal Dirichlet priors are supported, providing a broad framework for inference, data analysis, and sensitivity evaluation.
License: GPL-3
Depends: R (≥ 4.0.0), MCMCpack
Encoding: UTF-8
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-10-09 13:24:25 UTC; admin
Author: Subbiah M [aut, cre]
Maintainer: Subbiah M <sisufive@gmail.com>
Repository: CRAN
Date/Publication: 2025-10-15 20:00:24 UTC

BMDE: Multinomial–Dirichlet Equal Prior Bayesian Method

Description

Computes the Bayesian Dirichlet posterior for a multinomial vector with equal prior parameters and returns the posterior mean, 95 and the volume of those intervals.

Usage

BMDE(x, p)

Arguments

x

Integer vector of observed counts. Must be non-negative.

p

Numeric scalar or vector specifying Dirichlet prior parameters. Must be non-negative.

Value

Prints posterior means, lower and upper 95 and the product of the interval widths (volume).

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 1
BMDE(y, z)


BMDU: Multinomial–Dirichlet Unequal Prior Bayesian Method

Description

Computes the Bayesian Dirichlet posterior for a multinomial vector using unequal prior parameters. The prior is constructed by dividing the categories into two groups, assigning random priors from different ranges to simulate unequal information across categories.

Usage

BMDU(x, d)

Arguments

x

Integer vector of observed counts. Must be non-negative.

d

Integer scalar controlling how the categories are divided into two groups for constructing unequal Dirichlet priors.

Value

Prints posterior means, lower and upper 95 and the product of the interval widths (volume).

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 2
BMDU(y, z)


FS: Fitzpatrick and Scott Method for Simultaneous Confidence Intervals

Description

Computes simultaneous confidence intervals for multinomial proportions using the Fitzpatrick and Scott (FS) method. The function estimates the lower and upper confidence limits for each category, adjusts them to remain within the [0, 1] range, and calculates the overall volume (product of interval widths).

Usage

FS(inpmat, alpha)

Arguments

inpmat

Integer vector of observed counts (non-negative values).

alpha

Desired statistical Significance level.

Value

Prints the original and adjusted confidence intervals for each category, as well as the overall interval volume.

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
FS(y, z)


GM: Goodman Method for Simultaneous Confidence Intervals

Description

Computes simultaneous confidence intervals for multinomial proportions using the Goodman (1965) method. The function calculates lower and upper confidence limits for each category, adjusts them to remain within the [0, 1] range, and computes the overall interval volume (the product of interval widths).

Usage

GM(inpmat, alpha)

Arguments

inpmat

Integer vector of observed cell counts corresponding to a categorical dataset. Must contain non-negative values.

alpha

Desired statistical significance level

Details

This function implements the simultaneous confidence interval method proposed by Goodman (1965) for multinomial proportions. It adjusts each interval to ensure the limits fall within the valid probability range.

Value

Prints the original and adjusted confidence intervals for each category, as well as the overall volume of the simultaneous confidence intervals.

Author(s)

Dr. M. Subbiah

References

Goodman, L. A. (1965). *On Simultaneous Confidence Intervals for Multinomial Proportions.* Technometrics, **7**, 247–254.

See Also

BMDE, WALD, WS

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
GM(y, z)


QH: Quesenberry and Hurst Method for Simultaneous Confidence Intervals

Description

Computes simultaneous confidence intervals for multinomial proportions using the Quesenberry and Hurst (1964) method. The function calculates lower and upper confidence limits for each category, adjusts them to remain within the valid [0, 1] range, and computes the overall interval volume (the product of the interval widths).

Usage

QH(inpmat, alpha)

Arguments

inpmat

Integer vector of observed cell counts corresponding to a categorical dataset. Must contain non-negative values.

alpha

Desired statistical significance level

Details

This function implements the simultaneous confidence interval method proposed by Quesenberry and Hurst (1964) for multinomial proportions. It adjusts each interval to ensure limits remain within the [0, 1] range.

Value

Prints the original and adjusted confidence intervals for each category, as well as the overall volume of the simultaneous confidence intervals.

Author(s)

Dr. M. Subbiah

References

Quesenberry, C. P., and Hurst, D. C. (1964). *Large Sample Simultaneous Confidence Intervals for Multinomial Proportions.* Technometrics, **6**, 191–195.

See Also

BMDE, WALD, WS

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
QH(y, z)


SG: Sison and Glaz Method for Simultaneous Confidence Intervals

Description

Computes simultaneous confidence intervals for multinomial proportions using the Sison and Glaz (1995) method. The function implements the truncated Poisson approach, approximates the required probabilities via Edgeworth expansion, and determines the limits that ensure the overall confidence level (1 - alpha).

Usage

SG(x, alpha)

Arguments

x

Integer vector of observed cell counts corresponding to a categorical dataset. All entries must be non-negative.

alpha

Desired statistical significance level.

Details

This function implements the simultaneous confidence interval construction proposed by Sison and Glaz (1995). It is based on a truncated Poisson model with factorial and central moment calculations, Edgeworth expansion for probability approximation, and adjustment of limits to ensure they remain within the [0,1] range.

The computed volume represents the product of the widths of all confidence intervals and serves as a measure of the overall uncertainty.

Value

Prints the original and adjusted confidence intervals for each category, along with the volume (product of interval widths).

Author(s)

Dr. M. Subbiah

References

Sison, C. P., and Glaz, J. (1995). *Simultaneous Confidence Intervals and Sample Size Determination for Multinomial Proportions.* Journal of the American Statistical Association, **90**, 366–369.

See Also

BMDE, WALD, GM

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
SG(y, z)


WALD: Wald Method for Simultaneous Confidence Intervals

Description

Computes simple Wald-type simultaneous confidence intervals for multinomial proportions. These intervals are symmetric about the sample proportions and do not use continuity corrections, thus avoiding zero-width intervals even for extreme sample proportions.

Usage

WALD(inpmat, alpha)

Arguments

inpmat

Integer vector of observed cell counts corresponding to a categorical dataset. All values must be non-negative.

alpha

Desired statistical significance level

Details

The adjusted limits are truncated to stay within the [0,1] range.

Value

Prints the original and adjusted confidence intervals for each category, along with the volume (product of interval widths).

Author(s)

Dr. M. Subbiah

References

Wald, A. (1943). *Tests of Statistical Hypotheses Concerning Several Parameters When the Number of Observations is Large.* Transactions of the American Mathematical Society, **54**, 426–482.

See Also

BMDE, WALDCC, SG

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
WALD(y, z)


WALDCC: Wald Method with Continuity Correction for Simultaneous Confidence Intervals

Description

Computes Wald-type simultaneous confidence intervals for multinomial proportions, incorporating a continuity correction. These intervals are symmetric about the sample proportions and apply a small correction to improve coverage accuracy, particularly for small samples.

Usage

WALDCC(inpmat, alpha)

Arguments

inpmat

Integer vector of observed cell counts corresponding to a categorical dataset. All values must be non-negative.

alpha

Desired statistical significance level

Details

The correction term 1/2n ensures more accurate interval bounds, especially when the proportions are near 0 or 1.

Value

Prints the original and adjusted confidence intervals for each category, along with the volume (product of interval widths).

Author(s)

Dr. M. Subbiah

References

Wald, A. (1943). *Tests of Statistical Hypotheses Concerning Several Parameters When the Number of Observations is Large.* Transactions of the American Mathematical Society, **54**, 426–482.

See Also

BMDE, WALD, SG

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
WALDCC(y, z)


WS: Wilson Score Method for Simultaneous Confidence Intervals

Description

Computes Wilson score-type simultaneous confidence intervals for multinomial proportions. The Wilson method improves upon the Wald interval by ensuring better coverage probabilities, especially for small samples or proportions near 0 or 1.

Usage

WS(inpmat, alpha)

Arguments

inpmat

Integer vector of observed cell counts corresponding to a categorical dataset. All values must be non-negative.

alpha

Desired statistical significance level

Details

This approach adjusts both the center and width of the confidence interval to account for the sampling distribution of proportions, leading to non-symmetric intervals that perform better than the simple Wald intervals.

Value

Prints the original and adjusted confidence intervals for each category, along with the volume (product of interval widths).

Author(s)

Dr. M. Subbiah

References

Wilson, E. B. (1927). *Probable Inference, the Law of Succession, and Statistical Inference.* Journal of the American Statistical Association, **22**, 209–212.

See Also

BMDE, WALD, WALDCC, SG

Examples

y <- c(44, 55, 43, 32, 67, 78)
z <- 0.05
WS(y, z)