
Shortfall Risky Choice Model
shortfall.Rd
Fits the shortfall model for risky choices and judgments (Andraszewicz, 2014).
shortfall_d()
fits the shortfall model for discrete responses (select option).shortfall_c()
fits the shortfall model for continuous responses (judge options).
Arguments
- formula
A formula, the variables in
data
to be modeled. For example,y ~ x1 + p2 + x3 + p4 | x5 + p6 + x7 + p8
models response y as function of two stimuli with features x1, p2, x3, p4 and x5, p6, x7, p8, alternating outcomesx
and probabilitiesp
(respectively). Lines|
separate stimuli.- asp
A formula or a string, the variable in
data
with the aspiration level. For example,~ x9
or"x9"
. Can be stimulus-specific: for example~ x9 | x10
sets x9, x10 as aspiration levels for the 1. and 2. stimulus (respectively).- data
A data frame, the data to be modeled.
- fix
(optional) A list with parameter-value pairs of fixed parameters. If missing all free parameters are estimated. If set to
"start"
all parameters are fixed to their start values. Model parameter names arebeta
,delta
(see details - model parameters).list(beta = 3.09)
sets parameterbeta
equal to 3.09.list(beta = "delta")
sets parameterbeta
equal to parameterdelta
(estimatesdelta
).list(delta = "beta", beta = 3.09)
sets parameterdelta
equal to parameterbeta
and setsbeta
equal to 3.09 (estimates none of the two).list(beta = NA)
omits the parameterbeta
, if possible."start"
sets all parameters equal to their initial values (estimates none). Useful for building a first test model.
- options
(optional) A list, list entries change the modeling procedure. For example,
list(lb = c(k=0))
changes the lower bound of parameter k to 0, orlist(fit_measure = "mse")
changes the goodness of fit measure in parameter estimation to mean-squared error, for all options, see cm_options.- discount
A number, how many initial trials to not use during parameter fitting.
- ...
other arguments, ignored.
Value
Returns a cognitive model object, which is an object of class cm. A model, that has been assigned to m
, can be summarized with summary(m)
or anova(m)
. The parameter space can be viewed using pa. rspace(m)
, constraints can be viewed using constraints(m)
.
Details
The model trades off the expected value of a risky option with a \(\beta\)-weighted measure of the risk of the option. Risk is defined as the chance of falling short of a \(\delta\)-weighted aspiration level (see Andraszewicz, 2014). Model inputs are the risky options and the aspiration level. The subjective value \(v\) of option \(o\) given parameters \(\delta, \beta\) is modeled by $$v(o) = EV(o) - \beta R(o)$$ $$R(o) = \sum_i ( p_i ( max [ \delta asp_{o} - x_{o,i} , 0 ] )$$.
Model Parameters
beta
: the weight of the risk, risk aversion (\(0 \le \beta \le 10\)).delta
: the weight of the aspiration level (\(0 \le \delta \le 1\)).In
shortfall_d()
: Ifchoicerule = "softmax"
:tau
is the temperature or choice softness, higher values cause more equiprobable choices. Ifchoicerule = "epsilon"
:eps
is the error proportion, higher values cause more errors from maximizing.
References
Andraszewicz, S. (2014). Quantitative analysis of risky decision making in economic environments \(Doctoral dissertation, University of Basel\). doi:10.5451/unibas-006268585
See also
Other cognitive models:
baseline_const_c()
,
bayes()
,
choicerules
,
cpt
,
ebm()
,
hm1988()
,
shift()
,
threshold()
,
utility
Author
Jana B. Jarecki, jj@janajarecki.com
Examples
# Make some data -----------------------------------
dt <- data.frame(
x1 = rep(1,3), x2 = rep(2,3), px = rep(.5,3),
y1 = 0:2, y2 = rep(3,3), py = rep(.5,3),
aspiration = rep(1,3), choice = c(1,1,0))
# Make model ----------------------------------------
# 1. Continuous model - normal log likelihood
m <- shortfall_c(
formula = choice ~ x1 + px + x2,
asp = "aspiration",
data = dt)
#> Fitting free parameters [beta, delta, sigma] by maximizing loglikelihood (normal pdf) with grid, solnp.
m # view model
#> Shortfall | choice rule: none
#> Call:
#> shortfall_c(formula = choice ~ x1 + px + x2, asp = "aspiration", ...
#>
#> Free parameters: estimates
#> beta delta sigma
#> 2.550 0.073 0.957
#>
#>
#> ---
#> Note: No fixed parameter.
predict(m) # predict values/ratings
#> [1] 1.5 1.5 1.5
parspace(m) # view parameter space
#>
#> Parameter space of the cognitive model 'Shortfall':
#> lb ub start na
#> beta 0.0000000 10.0000000 1.0000000 0.0000000
#> delta 0.0000000 1.0000000 0.5000000 1.0000000
#> sigma 0.0000001 1.0000000 0.5000001 NA
#> ---
#> Note. lb = lower bound, ub = upper bound, start = start value.
# 2. Discrete model - binomial log likelihood
m <- shortfall_d(
formula = choice ~ x1 + px + x2 | y1 + py + y2,
asp = "aspiration",
data = dt,
choicerule = "softmax")
#> Fitting free parameters [beta, delta, tau] by maximizing loglikelihood (binomial pdf) with grid, solnp.
m # View model
#> Shortfall | choice rule: softmax
#> Call:
#> shortfall_d(formula = choice ~ x1 + px + x2 | y1 + py + y2, asp = "aspiration", ...
#>
#> Free parameters: estimates
#> beta delta tau
#> 10 1 1
#>
#>
#> ---
#> Note: No fixed parameter.
predict(m) # predict choice, Pr(select "x")
#> [1] 0.9925915 0.3799480 0.2729835
parspace(m) # View parameter space
#>
#> Parameter space of the cognitive model 'Shortfall':
#> lb ub start na
#> beta 0.000 10.000 1.000 0.000
#> delta 0.000 1.000 0.500 1.000
#> tau 0.001 10.000 0.500 NA
#> ---
#> Note. lb = lower bound, ub = upper bound, start = start value.