Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

rank_ord_switch

Switch from orderings to rankings and vice versa


Description

Convert the format of the input dataset from orderings to rankings and vice versa.

Usage

rank_ord_switch(data, format_input, nranked = NULL)

Arguments

data

Numeric NxK data matrix of partial sequences whose format has to be converted.

format_input

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

nranked

Optional numeric vector of length N with the number of items ranked by each sample unit.

Value

Numeric NxK data matrix of partial sequences with inverse format.

Author(s)

Cristina Mollica and Luca Tardella

Examples

## From orderings to rankings for the Dublin West dataset
data(d_dublinwest)
head(d_dublinwest)
rank_ord_switch(data=head(d_dublinwest), format_input="ordering")

PLMIX

Bayesian Analysis of Finite Mixtures of Plackett-Luce Models for Partial Rankings/Orderings

v2.1.1
GPL (>= 2)
Authors
Cristina Mollica [aut, cre], Luca Tardella [aut]
Initial release
2019-09-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.