cpt: Cumulative Prospect Theory Models

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Fits cumulative prospect theory, CPT (Tversky & Kahneman, 1992).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
cpt_d(
  formula,
  data,
  choicerule,
  ref = 0L,
  fix = list(),
  weighting = c("TK1992"),
  value = c("TK1992"),
  options = NULL
)

cpt_c(
  formula,
  data,
  ref = 0L,
  fix = list(),
  weighting = c("TK1992"),
  value = c("TK1992"),
  options = NULL
)

cpt_mem_d(formula, mem, data, choicerule, editing = "hedonic", options = NULL)

cpt_mem_c(formula, mem, data, editing = "hedonic", 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.

data

A data frame, the data to be modeled.

choicerule

A string, the choice rule. Allowed values, see cm_choicerules(): "none" is no choice rule, "softmax" is soft-maximum, "luce" is Luce's axiom.

ref

(optional, default: 0) A number, string, or RHS formula, the reference point or the variable in data that holds the reference point. For example ~ ref.

fix

(optional) A list or the string "start", the fixed model parameters, if missing all parameters are estimated. Model parameter names are alpha, beta, gammap, gamman, lambda (see details - model parameters).

  • list(alpha = 1.08) sets parameter alpha equal to 1.08.

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

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

  • list(alpha = NA) omits the parameter alpha, if possible.

  • "start" sets all parameters equal to their initial values (estimates none). Useful for building a first test model.

weighting

(optional) A string, the weighting function. Currently only "KT1992", the value function in Kahneman & Tversky (1992).

value

(optional) A string, the value function. Currently, only "KT1992", the value function in Kahneman & Tversky (1992).

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

mem

(optional, default: 0) A number, string, or RHS formula, the prior gains or losses in memory. Formula and string refer to variables in data, for example ~ xoutc.

editing

(optional) A string, the editing rule to use (see Thaler & Johnson, 1999, pp. 645), currently only "hedonic".

discount

A number, how many initial trials to not use during parameter fitting.

...

other arguments, ignored.

Details

Fits cumulative prospect theory.

Parameter Space

The model has the following free parameters:

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

Tversky, A., & Kahneman, D. (1992). Advances in prospect theory: cumulative representation of uncertainty. Journal of Risk and Uncertainty, 5, 297–-323. doi:10.1007/BF00122574

Thaler, R. H., & Johnson, E. J. (1990). Gambling with the House Money and Trying to Break Even: The Effects of Prior Outcomes on Risky Choice. Management Science, 36(6), 643–660. doi:10.1287/mnsc.36.6.643

See Also

Other cognitive models: baseline_const_c(), bayes(), choicerules, ebm(), hm1988(), shortfall, utility

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## From Tversky, A., & Kahneman, D. (1992).
dt <- data.frame(
  x1 = c(100, -100),
  px = 1,
  x2 = 0,
  y1 = c(200, -200),
  py = c(.71,.64),
  y2 = 0,
  rp = 1)

# Make the model -------------------------------------------
# add fix parameters (don't fit)
# using the Parameter from the paper

# Discrete responses with choicerule
M <- cpt_d(rp ~ x1 + px + x2 | y1 + py + y2, ref = 0,
         choicerule = "softmax", data = dt,
         fix = list(alpha = 0.88, beta = 0.88, lambda = 2.25,
         gammap = 0.61, gamman = 0.69, tau = 1))
# View the model
M        # has a parameter `tau`

# Continuous responses/utility
M <- cpt_c(rp ~ x1 + px + x2 | y1 + py + y2, ref = 0,
         data = dt,
         fix = list(alpha = 0.88, beta = 0.88, lambda = 2.25,
         gammap = 0.61, gamman = 0.69))
# View the model
M        # No parameter `tau`

# Methods ---------------------------------------------------
predict(M, "value") # predict values, also: M$predict("value")
predict(M, "mode") # predict choice probability after softmax
summary(M)
anova(M)

JanaJarecki/cogscimodels documentation built on Sept. 8, 2020, 7:28 p.m.