smaa.values | R Documentation |
Calculate the alternative values based on a set of samples from the criteria values distribution and a set of samples from the feasible weight space.
smaa.values(meas, pref)
meas |
Criteria measurements. An |
pref |
Weights. An |
An N \times m
array of alternative values.
Gert van Valkenhoef
smaa.pvf
smaa.ranks
N <- 1E4; m <- 2; n <- 3
meas <- dget(system.file("extdata/thrombo-meas.txt.gz", package="smaa"))
# Read weights from file
pref <- dget(system.file("extdata/thrombo-weights-nopref.txt.gz", package="smaa"))
# Alternatively, sample weights using hitandrun:
# library(hitandrun)
# pref <- simplex.sample(n, N)$samples
# Calculate alternative values
values <- smaa.values(meas, pref)
summary(values)
plot(values)
values.expected <- dget(system.file("extdata/thrombo-values-nopref.txt.gz", package="smaa"))
stopifnot(all.equal(values, values.expected))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.