shortfall: Shortfall Risky Choice Model

shortfallR Documentation

Shortfall Risky Choice Model

Description

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).

Usage

shortfall_d(formula, asp, data, choicerule, fix = list(), options = NULL)

shortfall_c(formula, asp, data, fix = list(), options = NULL)

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 outcomes x and probabilities p (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 are beta, delta (see details - model parameters).

  • list(beta = 3.09) sets parameter beta equal to 3.09.

  • list(beta = "delta") sets parameter beta equal to parameter delta (estimates delta).

  • list(delta = "beta", beta = 3.09) sets parameter delta equal to parameter beta and sets beta equal to 3.09 (estimates none of the two).

  • list(beta = NA) omits the parameter beta, 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, or list(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.

Details

The model trades off the expected value of a risky option with a β-weighted measure of the risk of the option. Risk is defined as the chance of falling short of a δ-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 δ, β is modeled by

v(o) = EV(o) - β R(o)

R(o) = ∑_i ( p_i ( max [ δ asp_{o} - x_{o,i} , 0 ] )

.

Model Parameters

  • beta: the weight of the risk, risk aversion (0 ≤ β ≤ 10).

  • delta: the weight of the aspiration level (0 ≤ δ ≤ 1).

  • In shortfall_d(): If choicerule = "softmax": tau is the temperature or choice softness, higher values cause more equiprobable choices. If choicerule = "epsilon": eps is the error proportion, higher values cause more errors from maximizing.

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).

Author(s)

Jana B. Jarecki, jj@janajarecki.com

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

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)

m            # view model
predict(m)   # predict values/ratings
parspace(m)  # view parameter space

# 2. Discrete model - binomial log likelihood
m <- shortfall_d(
   formula = choice ~ x1 + px + x2 | y1 + py + y2,
   asp = "aspiration",
   data = dt,
   choicerule = "softmax")

m            # View model
predict(m)   # predict choice, Pr(select "x")
parspace(m)  # View parameter space

JanaJarecki/cogscimodels documentation built on Nov. 4, 2022, 5:33 p.m.