UtilityModels.ExpectedUtility
— TypeExpectedUtility{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)
UtilityModels.Gamble
— TypeGamble{T <: Real}
A gamble object with probability vector p
and outcome vector v
.
Fields
p
: probability vectorv
: outcome vector
Constructors
Gamble(; p = [0.5, 0.5], v = [10.0, 0.0])
Gamble(p, v)
UtilityModels.ProspectTheory
— TypeProspectTheory{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.
UtilityModels.TAX
— TypeTAX{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.
UtilityModels.UtilityModel
— TypeUtilityModel <: DiscreteMultivariateDistribution
UtilityModel
is an abstract type for utility-based models ````
UtilityModels.ValenceExpectancy
— TypeValenceExpectancy{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)
Distributions.logpdf
— Methodlogpdf(model::UtilityModel, gambles::Vector{<:Gamble}, choice::Int)
Computes the choice log probability for a vector of gambles.
Arguments
model::UtilityModel
: a utility modelgambles::Vector{<:Gamble}
: a vector of gambles representing a choice setchoice_idxs::Vector{<:Int}
: indices for the chosen gambles
Distributions.pdf
— Methodpdf(model::UtilityModel, gambles::Vector{<:Gamble}, choice::Int)
Computes the choice probability for a vector of gambles.
Arguments
model::UtilityModel
: a utility modelgambles::Vector{<:Gamble}
: a vector of gambles representing a choice setchoice_idxs::Vector{<:Int}
: indices for the chosen gambles
Statistics.mean
— Methodmean(model::UtilityModel, gamble::Gamble)
Computes mean or expected utility
Arguments
model::UtilityModel
: a model M <: UtilityModelgamble::Gamble
: a gamble object
````
Statistics.mean
— Methodmean(model::AbstractTAX, gamble::Gamble)
Computes mean utility for the TAX model
Arguments
model::AbstractTAX
: a model M <: UtilityModelgamble::Gamble
: a gamble object
Statistics.std
— Methodstd(model::UtilityModel, gamble::Gamble)
Computes the standard deviation of the gamble
Arguments
model::UtilityMode
: a model M <: UtilityModelgamble::Gamble
: a gamble object
Statistics.var
— Methodvar(model::UtilityModel, gamble::Gamble)
Computes the variance of the gamble
Arguments
model::UtilityModel
: a utility modelgamble::Gamble
: a gamble object
UtilityModels.compute_utility
— Methodcompute_utility(model::ExpectedUtility, gamble::Gamble)
Computes utility of gamble outcomes according to expected utility theory.
Arguments
model::ExpectedUtility
: a model object for prospect theorygamble::Gamble
: a gamble object
UtilityModels.compute_utility
— Methodcompute_utility(model::AbstractProspectTheory, gamble)
Computes utility of gamble outcomes according to prospect theory
Arguments
model::AbstractProspectTheory
: a model object for prospect theorygamble
: a gamble object
UtilityModels.compute_utility
— Methodcompute_utility(model::AbstractTAX, gamble)
Computes utility of gamble outcomes according to TAX
Arguments
model::AbstractTAX
: a model object for TAXgamble
: a gamble object
UtilityModels.compute_utility
— Methodcompute_utility(model::ValenceExpectancy, outcomes::Vector)
compute_utility
computes utility of gamble outcomes according to expected utility theory
model
: a model object for prospect theoryoutcomes
: observed outcomes of decisions