smaa.values {smaa} | 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 N * m * n
array, where |
pref |
Weights. An N * n array, where |
An N * m array of alternative values.
Gert van Valkenhoef
N <- 1E4; m <- 2; n <- 3 meas <- dget(system.file("extdata/thrombo-meas.txt.gz", package="smaa")) # Sample / read weights ## Not run: library(hitandrun) pref <- simplex.sample(n, N)$samples ## End(Not run) pref <- dget(system.file("extdata/thrombo-weights-nopref.txt.gz", package="smaa")) # 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))