rank_summaries {PLMIX}R Documentation

Descriptive summaries for a partial ordering/ranking dataset

Description

Compute rank summaries and censoring patterns for a partial ordering/ranking dataset.

Usage

rank_summaries(data, format_input, mean_rank = TRUE, marginals = TRUE,
  pc = TRUE)

Arguments

data

Numeric NN×\timesKK data matrix of partial sequences.

format_input

Character string indicating the format of the data input, namely "ordering" or "ranking".

mean_rank

Logical: whether the mean rank vector has to be computed. Default is TRUE.

marginals

Logical: whether the marginal rank distributions have to be computed. Default is TRUE.

pc

Logical: whether the paired comparison matrix has to be computed. Default is TRUE.

Value

A list of named objects:

nranked

Numeric vector of length NN with the number of items ranked by each sample unit.

nranked_distr

Frequency distribution of the nranked vector.

na_or_not

Numeric 33×\timesKK 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 NN.

mean_rank

Numeric vector of length KK with the mean rank of each item.

marginals

Numeric KK×\timesKK matrix of the marginal rank distributions: the (i,j)(i,j)-th entry indicates the number of units that ranked item ii in the jj-th position.

pc

Numeric KK×\timesKK paired comparison matrix: the (i,i)(i,i')-th entry indicates the number of sample units that preferred item ii to item ii'.

Author(s)

Cristina Mollica and Luca Tardella

References

Marden, J. I. (1995). Analyzing and modeling rank data. Monographs on Statistics and Applied Probability (64). Chapman & Hall, ISSN: 0-412-99521-2. London.

Examples


data(d_carconf)
rank_summaries(data=d_carconf, format_input="ordering")

[Package PLMIX version 2.1.1 Index]