eval_utilities: Evaluate utilities

View source: R/eval_utilities.R

eval_utilitiesR Documentation

Evaluate utilities

Description

Evaluation of utilities for a data.table of indexes, the utilities functions are computed over every index represented by each column of the input table.

Usage

eval_utilities(index, columns, functions)

Arguments

index

data.table of indexes.

columns

columns with indexes where the utilities will be computed.

functions

vector of characters with name of functions.

Details

Every index has associated an utility function, inside mau is possible to employ any functions, the only special requirement is that the utility has to be normalized, this means that the utility is bounded between 0 and 1.

Also is possible to consider utilities with constant risk aversion CRA, in the sense of Arrow, for such case there is only two types of functions u(x) = a x + b or u(x) = a e^{bx} + c, to determine these functions, it is only necessary to specify the parameters a, b and c. For a decision model only elaborated with CRA utilities, mau could read a text file where every utility is piecewise defined.

The format for the text file containing the definition of utility functions is given by is:

[Header]

[Function name]
[min1 max1 a1 b1 c1]
[min2 max2 a2 b2 c2]
[min3 max3 a3 b3 c3]
...
[Function name]
[min1 max1 a1 b1 c1]
[min2 max2 a2 b2 c2]
[min3 max3 a3 b3 c3]
...

If the coefficient c is non zero the function is interpreted as an exponential type.

Value

data.table with utilities evaluated for every index.

Author(s)

Pedro Guarderas, pedro.felipe.guarderas@gmail.com, Andrés Lopez.

See Also

read_utilities, stand_string

Examples

library( mau )
vignette( topic = 'Running_MAUT', package = 'mau' ) 

pedroguarderas/mau documentation built on June 4, 2024, 2:04 a.m.