dualGainLossFunction: Calculates the gain-loss matrix from a decision matrix

Description Usage Arguments Details Value References Examples

Description

This function is called by smallerThanZero for its second step. It takes a matrix and runs the gain-loss function over each value of the matrix. The gain-loss function returns a positive value (gain) for values larger than the status-quo and negative values (loss) for smaller than the sq.

Usage

1
dualGainLossFunction(aMatrix, dual.refps)

Arguments

aMatrix

the decision matrix, with attr as columns and rounds as rows.

dual.refps

two numeric reference points (status-quo, goal).

Details

The matematical function used here is the one given by [1] and since it is composed of a logarithmic function it does not accept negative values.

Value

a gain-loss matrix with equal dimensions as the input aMatrix

References

[1] Golman, R., & Loewenstein, G. (2011). Explaining Nonconvex Preferences with Aspirational and Status Quo Reference Dependence. Mimeo, Carnegie Mellon University.

Examples

1
2
3
#Runnable
dualGainLossFunction(matrix(101:300, 20, 10, byrow= T), dual.refps= c(142, 195))
dualGainLossFunction(matrix(16:31, 4, 4), dual.refps= c(20, 25))

avilesd/productConfig documentation built on May 11, 2019, 4:08 p.m.