ptvalue: Value function in Prospect Theory

Description Usage Arguments Details References Examples

View source: R/ptvalue.R

Description

Produces asymmetric S-shaped value function according to lessons from Prospect Theory that losses are felt more intensely than gains.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
ptvalue(
  x,
  sigma = 0.3,
  lambda = -2.25,
  xint,
  xintcol = 1,
  main = NULL,
  sub = NULL,
  xlab = "Loss / Gain",
  ylab = "Value",
  col = 1,
  bg.col = "white",
  ticks = TRUE,
  xlabels = TRUE,
  ylabels = TRUE,
  by_x = 10,
  by_y = 20
)

Arguments

x

Numeric. Vector of gain / loss values for x.

sigma

Number. Exponent of functions, should be less than 1 to make an 'S' shaped curve.

lambda

Number. Extent of asymmetry between losses and gains. Should be less than -1 for losses to be more 'intense' than gains (as suggested by Prospect Theory). Between -1 and 0 for gains to be more intense than losses. Greater than 0 for losses to have positive value.

xint

Numeric. Symmetric intersections. X-intercept values where to highlight points – will be placed at both xint and abs(xint) to demonstrate asymmetry in value.

xintcol

Color of dashed lines calling-out xint.

main

Main title of the plot.

sub

Subtitle of the plot.

xlab

Name of the X-axis.

ylab

Name of the Y-axis.

col

Color of function segment.

bg.col

Background color.

ticks

TOOD

xlabels

TRUE / FALSE : whether x labels are included.

ylabels

TRUE / FALSE : whether y labels are included.

by_x

Number. Increment of the x-axis labels.

by_y

Number. Increment of the x-axis labels.

Details

TODO

References

Tversky, Amos; Kahneman, Daniel (1992). "Advances in prospect theory: Cumulative representation of uncertainty". Journal of Risk and Uncertainty. 5 (4): 297–323.

Examples

1
2
3
4
5
6
7
ptvalue(
  sigma = 0.25,
  xint = 20,
  xintcol = 'blue',
  main = "Prospect Theory Shows That Gains & Losses are Felt Assymetrically",
  sub = "Losses are More Intense"
)

R-CoderDotCom/econocharts documentation built on Oct. 16, 2021, 12:42 p.m.