Learn R Programming

smaa (version 0.3-3)

smaa.cw: SMAA central weights

Description

Calculate SMAA central weights from sampled rankings and the corresponding weights.

Usage

smaa.cw(ranks, pref)

Value

An \(m \times n\) matrix of central weights, where each row corresponds to an alternative and each column to a criterion. The number of SMAA iterations is stored in attr(x, "smaa.N").

Arguments

ranks

An \(N \times m\) array of sampled rankings, where \(N\) is the number of SMAA iterations and \(m\) is the number of alternatives.

pref

An \(N \times n\) array of sampled rankings, where \(N\) is the number of SMAA iterations and \(n\) is the number of alternatives.

Author

Gert van Valkenhoef

See Also

smaa.ranks

Examples

Run this code
N <- 1E4; m <- 2; n <- 3
meas <- dget(system.file("extdata/thrombo-meas.txt.gz", package="smaa"))
pref <- dget(system.file("extdata/thrombo-weights-nopref.txt.gz", package="smaa"))

# Calculate central weights
values <- smaa.values(meas, pref)
ranks <- smaa.ranks(values)
cw <- smaa.cw(ranks, pref)
print(cw)
plot(cw)

Run the code above in your browser using DataLab