wdmat: Compute the weighted distances between two data sets of...

Description Usage Arguments Value Author(s) Examples

Description

This function computes the weighted distances between two data sets of complete rankings. The results are put in the matrix form. The data set could be aggregated or not.

Usage

1
2
wdmat(dset1, dset2 = dset1, dset1.agg = FALSE, dset2.agg = FALSE,
  dtype = "Kendall", weight = NULL, modal = NULL)

Arguments

dset1

one data set with each row being a ranking

dset2

the other data set (default as dset1)

dset1.agg

whether the data set is in the aggregated form (default as FALSE)

dset2.agg

whether the data set is in the aggregated form (default as FALSE)

dtype

type of the weighted distance measure Kendall or K(default) : "Weighted Kendall's tau", SqrtSpearman or SS : "Square root of weighted Spearman", Spearman or S : "Weighted Spearman"

weight

weight vector (default as all components being 1)

modal

the modal ranking (default as c(1:k), k being the number of ranked items)

Value

a list whose first object is a vector about the aggregation status of the two data sets c(dset1.agg, dset2.agg), and second object is a matrix of distances.

Author(s)

Yumin Zhang <zymneo@gmail.com>

Examples

1
2
data(Croon)
wdmat(Croon, dset1.agg=TRUE, dset2.agg=TRUE)

StatMethRank documentation built on Jan. 15, 2017, 8:59 p.m.