Learn R Programming

StatMethRank (version 1.3)

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

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

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.

Examples

Run this code
data(Croon)
wdmat(Croon, dset1.agg=TRUE, dset2.agg=TRUE)

Run the code above in your browser using DataLab