Marginal and simultaneous confidence sets for ranks of categories, where categories are ranked by the probabilities of being chosen.
csranks_multinom(
x,
coverage = 0.95,
cstype = "two-sided",
simul = TRUE,
multcorr = "Holm",
indices = NA,
na.rm = FALSE
)
vector of counts indicating how often each category was chosen.
nominal coverage of the confidence set. Default is 0.95.
type of confidence set (two-sided
, upper
, lower
). Default is two-sided
.
logical; if TRUE
(default), then simultaneous confidence sets are computed, which jointly cover all populations indicated by indices
.
Otherwise, for each population indicated in indices
a marginal confidence set is computed.
multiplicity correction to be used: Holm
(default) or Bonferroni
. See Details section for more.
vector of indices of x
for whose ranks the confidence sets are computed. indices=NA
(default) means computation of confidence sets for all populations.
logical; if TRUE
, then NA
's are removed from x
and Sigma
(if any).
A csranks
object, which is a list with three items:
L
Lower bounds of the confidence sets for ranks indicated in indices
rank
Estimated ranks from irank
with default parameters
U
Upper bounds of the confidence sets.
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.
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