Marginal and simultaneous confidence sets for ranks of categories, where categories are ranked by the probabilities of being chosen.
Usage
csranks_multinom(
x,
coverage = 0.95,
cstype = "two-sided",
simul = TRUE,
multcorr = "Holm",
indices = NA,
na.rm = FALSE
)Arguments
- x
vector of counts indicating how often each category was chosen.
- coverage
nominal coverage of the confidence set. Default is 0.95.
- cstype
type of confidence set (
two-sided,upper,lower). Default istwo-sided.- simul
logical; if
TRUE(default), then simultaneous confidence sets are computed, which jointly cover all populations indicated byindices. Otherwise, for each population indicated inindicesa marginal confidence set is computed.- multcorr
multiplicity correction to be used:
Holm(default) orBonferroni. See Details section for more.- indices
vector of indices of
xfor whose ranks the confidence sets are computed.indices=NA(default) means computation of confidence sets for all populations.- na.rm
logical; if
TRUE, thenNA's are removed fromxandSigma(if any).
Value
A csranks object, which is a list with three items:
LLower bounds of the confidence sets for ranks indicated in
indicesrankEstimated ranks from
irankwith default parametersUUpper bounds of the confidence sets.
Details
This function computes confidence sets for ranks similarly as csranks, but it is tailored to the special case of
multinomial data. Suppose there are \(p\) populations (for the case of multinomial data, we will refer to them as "categories") such
as political parties, for example, that one wants to rank by the probabilities of them being chosen. For political parties, this would
correspond to the share of votes each party obtains. Here, the underlying data are multinomial: each observation corresponds to a choice
among the \(p\) categories. The vector x contains the counts of how often each category was chosen in the data.
In this setting, link{csranks} could be applied to compute confidence sets for the ranks of each category, but instead this function
implements a different method proposed by Bazylik, Mogstad, Romano, Shaikh, and Wilhelm (2023), which exploits the
multinomial structure of the problem and yields confidence sets for the ranks that are valid in finite samples (whereas csranks produces
confidence sets that are valid only asymptotically).
The procedure involves testing multiple hypotheses. The \code{multcorr} indicates a method for multiplicity correction. See the paper for
details.
References
Bazylik, Mogstad, Romano, Shaikh, and Wilhelm. "Finite-and large-sample inference for ranks using multinomial data with an application to ranking political parties". cemmap working paper