Description Usage Arguments Details Value References Examples
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
.
1 | dualGainLossFunction(aMatrix, dual.refps)
|
aMatrix |
the decision matrix, with |
dual.refps |
two numeric reference points (status-quo, goal). |
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.
a gain-loss matrix with equal dimensions as the input aMatrix
[1] Golman, R., & Loewenstein, G. (2011). Explaining Nonconvex Preferences with Aspirational and Status Quo Reference Dependence. Mimeo, Carnegie Mellon University.
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))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.