DistanceFromRank function

DistanceFromRank: Creates a 3-dimensional distance array from the results of a ranking task.

DistanceFromRank: Creates a 3-dimensional distance array from the results of a ranking task.

DistanceFromRank: Takes the results from a (plain) ranking task where KK assessors rank (with possible ties) II observations on one dimension and transform it into a brick of data to be used by distatis.

DistanceFromRank(X)

Arguments

  • X: gives the results of a ranking task (see example below) as an objects (rows) by assessors (columns) matrix.

Returns

DistanceFromRank returns an IIKI*I*K

array of distance.

Details

DistanceFromRank creates an IIKI*I*K

array of distance in which each of the KK "slices" stores the (squared Euclidean ranking) distance matrix of the kkth assessor. In one of these distance matrices, the distance between two objects is computed from he Pythagorean theorem. The ouput ot the function DistanceFromRank

is used as input for the function distatis.

The input should have assessors as columns and observations as rows (see example below).

Examples

# Use the data set WinesRankingRawData stored in an excel file. path2file <- system.file("extdata", "WinesRankingRawData.xlsx", package = 'DistatisR') ranking6Wines <- read.df.excel(path = path2file, sheet = 'Ranking') aCubeOfDistance <- DistanceFromRank(ranking6Wines$df.data)

See Also

distatis DistanceFromSort

Author(s)

Herve Abdi

  • Maintainer: Herve Abdi
  • License: GPL-2
  • Last published: 2022-12-05

Useful links