Learn R Programming

smaa (version 0.3-3)

smaa.values: SMAA alternative values

Description

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.

Usage

smaa.values(meas, pref)

Value

An \(N \times m\) array of alternative values.

Arguments

meas

Criteria measurements. An \(N \times m \times n\) array, where meas[i,,] is a matrix where the m alternatives are the rows and the n criteria the columns. The values must be standardized measurements (i.e. after application of the partial value function). smaa.pvf provides a convenience method to standardize partial values.

pref

Weights. An \(N \times n\) array, where pref[i,] is a normalized weight vector.

Author

Gert van Valkenhoef

See Also

smaa.pvf smaa.ranks

Examples

Run this code
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))

Run the code above in your browser using DataLab