SAVF_score: Single attribute value function

Description Usage Arguments Value See Also Examples

View source: R/single-attribute-value-functions.R

Description

SAVF_score computes the exponential single attribute value score of x

Usage

1
SAVF_score(x, x_low, x_high, rho)

Arguments

x

Numeric vector of values to score

x_low

Lower bound anchor point (can be different than min(x))

x_high

Upper bound anchor point (can be different than max(x))

rho

Exponential constant for the value function

Value

A vector of the same length as x with the exponential single attribute value scores

See Also

SAVF_plot for plotting single attribute scores

SAVF_preferred_rho for identifying the preferred rho

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# The single attribute x is bounded between 1 and 5 and follows an exponential
# utility curve with rho = .653

x <- runif(10, 1, 5)
x
## [1] 2.964853 1.963182 1.223949 1.562025 4.381467 2.286030 3.071066
## [8] 4.470875 3.920913 4.314907

SAVF_score(x, x_low = 1, x_high = 5, rho = .653)
## [1] 0.7800556 0.5038275 0.1468234 0.3315217 0.9605856 0.6131944 0.8001003
## [8] 0.9673124 0.9189685 0.9553165

koalaverse/KraljicMatrix documentation built on May 25, 2019, 9:30 p.m.