Compute rank summaries and censoring patterns for a partial ordering/ranking dataset.
rank_summaries(
data,
format_input,
mean_rank = TRUE,
marginals = TRUE,
pc = TRUE
)A list of named objects:
nrankedNumeric vector of length \(N\) with the number of items ranked by each sample unit.
nranked_distrFrequency distribution of the nranked vector.
na_or_notNumeric \(3\)\(\times\)\(K\) matrix with the counts of sample units that ranked or not each item. The last row contains the total by column, corresponding to the sample size \(N\).
mean_rankNumeric vector of length \(K\) with the mean rank of each item.
marginalsNumeric \(K\)\(\times\)\(K\) matrix of the marginal rank distributions: the \((i,j)\)-th entry indicates the number of units that ranked item \(i\) in the \(j\)-th position.
pcNumeric \(K\)\(\times\)\(K\) paired comparison matrix: the \((i,i')\)-th entry indicates the number of sample units that preferred item \(i\) to item \(i'\).
Numeric \(N\)\(\times\)\(K\) data matrix of partial sequences.
Character string indicating the format of the data input, namely "ordering" or "ranking".
Logical: whether the mean rank vector has to be computed. Default is TRUE.
Logical: whether the marginal rank distributions have to be computed. Default is TRUE.
Logical: whether the paired comparison matrix has to be computed. Default is TRUE.
Cristina Mollica and Luca Tardella
Marden, J. I. (1995). Analyzing and modeling rank data. Monographs on Statistics and Applied Probability (64). Chapman & Hall, ISSN: 0-412-99521-2. London.
data(d_carconf)
rank_summaries(data=d_carconf, format_input="ordering")
Run the code above in your browser using DataLab