UtilityModels.ExpectedUtilityType
ExpectedUtility{T <: Real} <: UtilityModel

A model object for expected utility theory

Fields

  • α: utility curvature
  • θ: temperature or decisional consistency

Constructors

ExpectedUtility(; α = .80, θ = 1.0)
ExpectedUtility(α, θ)

Example

using UtilityModels

gamble1 = Gamble(; 
    p = [.25, .25, .50], 
    v = [44, 40, 5]
)

gamble2 = Gamble(; 
    p = [.25, .25, .50], 
    v = [98, 10, 5]
)

gambles = [gamble1,gamble2]

mean.(model, gambles)
std.(model, gambles)

model = ExpectedUtility(; α = .80, θ = 1.0)

pdf(model, gambles, 1)

logpdf(model, gambles, 1)
source
UtilityModels.GambleType
Gamble{T <: Real}

A gamble object with probability vector p and outcome vector v.

Fields

  • p: probability vector
  • v: outcome vector

Constructors

Gamble(; p = [0.5, 0.5], v = [10.0, 0.0])

Gamble(p, v)
source
UtilityModels.ProspectTheoryType

ProspectTheory{T <: Real} <: AbstractProspectTheory

A model object for cummulative prospect theory. By default, parameters for utility curvature and probability weigting are equal gains and losses.

Fields

  • α = .80: utility curvature for gains
  • β = α: utility curvature for losses
  • γg = .70: probability weighting parameter for gains
  • γl = γg: probability weighting parameter for losses
  • λ = 2.25: loss aversion parameter
  • θ: temperature or decisional consistency

Constructors

ProspectTheory(; α = 0.80, β = α, γg = 0.70, γl = γg, λ = 2.25, θ = 1.0)

ProspectTheory(α, β, γg, γl, λ, θ)

Example

using UtilityModels

gamble1 = Gamble(; 
    p = [.25, .25, .50], 
    v = [44, 40, 5]
)

gamble2 = Gamble(; 
    p = [.25, .25, .50], 
    v = [98, 10, 5]
)

gambles = [gamble1,gamble2]

mean.(model, gambles)
std.(model, gambles)

model = ProspectTheory(; 
    α = 0.80, 
    γg = 0.70, 
    λ = 2.25, 
    θ = 1.0
)

pdf(model, gambles, 1)

logpdf(model, gambles, 1)

References

Fennema, H., & Wakker, P. (1997). Original and cumulative prospect theory: A discussion of empirical differences. Journal of Behavioral Decision Making, 10(1), 53-64.

Tversky, A., & Kahneman, D. (1992). Advances in prospect theory: Cumulative representation of uncertainty. Journal of Risk and uncertainty, 5(4), 297-323.

source
UtilityModels.TAXType
TAX{T <: Real} <: AbstractTAX

A model object for transfer of attention exchange.

Fields

  • δ = 1.0: transfer of attention parameter
  • γ = 1.0: probability weighting parameter
  • β = .70: utility curvature
  • θ: temperature or decisional consistency

Constructors

TAX(; δ = -1.0, β = 1.0, γ = 0.70, θ = 1.0)

TAX(δ, γ, β, θ)

Example

using UtilityModels

gamble1 = Gamble(; 
    p = [.25, .25, .50], 
    v = [44, 40, 5]
)

gamble2 = Gamble(; 
    p = [.25, .25, .50], 
    v = [98, 10, 5]
)

gambles = [gamble1,gamble2]

mean.(model, gambles)
std.(model, gambles)

model = TAX(; 
    δ = -1.0, 
    β = 1.0, 
    γ = 0.70, 
    θ = 1.0
)

pdf(model, gambles, 1)

logpdf(model, gambles, 1)

References

Birnbaum, M. H., & Chavez, A. (1997). Tests of theories of decision making: Violations of branch independence and distribution independence. Organizational Behavior and Human Decision Processes, 71(2), 161-194. Birnbaum, M. H. (2008). New paradoxes of risky decision making. Psychological Review, 115(2), 463.

source
UtilityModels.ValenceExpectancyType
ValenceExpectancy{T <: Real} <: AbstractValenceExpectancy

A model object for expected utility theory

Fields

  • υ: a vector of expected utilities
  • Δ: learning rate where Δ ∈ [0,1]
  • α: utility shape parameter where α > 0
  • λ: loss aversion where λ > 0
  • c: temperature

Constructors

ValenceExpectancy(; n_options, Δ, α = 0.80, λ, c)

ValenceExpectancy(Δ, α, λ, c)
source
Distributions.logpdfMethod
logpdf(model::UtilityModel, gambles::Vector{<:Gamble}, choice::Int)

Computes the choice log probability for a vector of gambles.

Arguments

  • model::UtilityModel: a utility model
  • gambles::Vector{<:Gamble}: a vector of gambles representing a choice set
  • choice_idxs::Vector{<:Int}: indices for the chosen gambles
source
Distributions.pdfMethod
pdf(model::UtilityModel, gambles::Vector{<:Gamble}, choice::Int)

Computes the choice probability for a vector of gambles.

Arguments

  • model::UtilityModel: a utility model
  • gambles::Vector{<:Gamble}: a vector of gambles representing a choice set
  • choice_idxs::Vector{<:Int}: indices for the chosen gambles
source
Statistics.meanMethod
mean(model::UtilityModel, gamble::Gamble)

Computes mean or expected utility

Arguments

  • model::UtilityModel: a model M <: UtilityModel
  • gamble::Gamble: a gamble object

````

source
Statistics.meanMethod
mean(model::AbstractTAX, gamble::Gamble)

Computes mean utility for the TAX model

Arguments

  • model::AbstractTAX: a model M <: UtilityModel
  • gamble::Gamble: a gamble object
source
Statistics.stdMethod
std(model::UtilityModel, gamble::Gamble)

Computes the standard deviation of the gamble

Arguments

  • model::UtilityMode: a model M <: UtilityModel
  • gamble::Gamble: a gamble object
source
Statistics.varMethod
var(model::UtilityModel, gamble::Gamble)

Computes the variance of the gamble

Arguments

  • model::UtilityModel: a utility model
  • gamble::Gamble: a gamble object
source
UtilityModels.compute_utilityMethod
compute_utility(model::ExpectedUtility, gamble::Gamble)

Computes utility of gamble outcomes according to expected utility theory.

Arguments

  • model::ExpectedUtility: a model object for prospect theory
  • gamble::Gamble: a gamble object
source
UtilityModels.compute_utilityMethod
compute_utility(model::AbstractProspectTheory, gamble)

Computes utility of gamble outcomes according to prospect theory

Arguments

  • model::AbstractProspectTheory: a model object for prospect theory
  • gamble: a gamble object
source
UtilityModels.compute_utilityMethod
compute_utility(model::AbstractTAX, gamble)

Computes utility of gamble outcomes according to TAX

Arguments

  • model::AbstractTAX: a model object for TAX
  • gamble: a gamble object
source
UtilityModels.compute_utilityMethod
compute_utility(model::ValenceExpectancy, outcomes::Vector)

compute_utility computes utility of gamble outcomes according to expected utility theory

  • model: a model object for prospect theory
  • outcomes: observed outcomes of decisions
source