Description Usage Arguments Details Value References Examples
This function is based on the value function of the dual reference point
(dual-rp) models, as seen in reference 1 (Golman, Loewenstein). It first
builds a desicion matrix for each user and then applys the 'utility function'
over each value using two given reference points (SQ, G). It does so by
calling the function smallerThanZero
. The dual-rp utility
function works in two steps, much like prospect theory's value function
overallPV,pvMatrix
See details and references.
1 2 3 |
dataset |
data.frame with the user generated data from a product
configurator. See |
userid |
a vector of integers that gives the information of which users the matrix should be calculated. Vectorised. |
attr |
attributes IDs, vector of integer numbers corresponding to the
attributes you desire to use; |
rounds |
integer vector or text option. Which steps of the configuration
process should be shown? Defaults are first and last step. Text options are
|
cost_ids |
argument used to convert selected cost attributes into benefit attributes. Integer vector. |
dual.refps |
numeric matrix or vector - two numbers indicating the status-quo and the aspiration level(goal) for the given attributes. This function is an improvement over |
lambda |
numeric - parameter of loss aversion for the value function as
given by reference[1]. Default value is 2.25 as in [2] and should be
|
delta |
numeric - expresses the relative importance of the aspiration
level to other factors. Default is 0.8 and it should satisfy |
consumption_fun |
non-working parameter for future developments. Leave at NULL. |
Note that since the dual-rp value function uses a logarithmic
function, attribute values and reference points should be larger than zero.
Nontheless, if this function detects a zero or negative value it will
monotonically scale your data and your reference points so that for all
values applies x > 0
. The transformation does not have an impact on
the absolute differences between attribute values and reference points.
This function is an improvement over dualValueMatrix.oneAttr
since it allows a matrix to be given through dual.refps
. The matrix
should have two columns, first column is the Status-Quo and the second
should be the Goal. It should have as many rows as attributes, i.e. one set
of reference points for each attribute.
dataset
We assume the input data.frame has following columns usid =
User IDs, round = integers indicating which round the user is in (0-index
works best for 'round'), atid = integer column for referring the attribute
ID (1 indexed), selected = numeric value of the attribute for a specific,
given round, selectable = amount of options the user can chose at a given
round, with the current configuration.
userid
is a necessary parameter, without it you'll get a warning.
Default is NULL.
attr
Default calculates with all attributes. Attributes are
automatically read from provided dataset, it is important you always
provide the complete data so that the package functions properly. Moreover,
userid
and attr
will not be sorted and will appear in the
order you input them.
rounds
Default calculates with first and last rounds (initial and
final product configuration). You can give a vector of arbitrarily chosen
rounds as well.
cost_ids
Default assumes all your attributes are of benefit type,
that is a higher value in the attribute means the user is better off than
with a lower value. If one or more of the attributes in your data is of
cost type, e.g. price, so that lower is better then you should identify
this attributes as such, providing their id, they'll be converted to
benefit type (higher amount is better).
delta
[1] Initially called alpha, we chose delta to avoid confusion
with prospect theory's parameter for concavity, such as seen in
overallPV
Note: When converting a cost attribute to a benefit attribute its two
reference points change as well, enter the unconverted dual.refps, the
function transforms them automatically when it detects a cost_ids !=
NULL
. Also, since for cost attributes, lower is better, unconverted they
should follow (G < SQ).
a list of value matrices for each user.
[1] Golman, R., & Loewenstein, G. (2011). Explaining Nonconvex Preferences with Aspirational and Status Quo Reference Dependence. Mimeo, Carnegie Mellon University.
[2] Tversky, A., & Kahneman, D. (1992). Advances in prospect theory: Cumulative representation of uncertainty. Journal of Risk and uncertainty, 5(4), 297-323.
1 2 3 4 5 | #Not runnable yet
dualValueMatrix(pc_config_data, 9:10, dual.refps = c(1, 3.5))
dualValueMatrix(aDataFrame, userid = 100, rounds = "all", dual.refps = c(1, 2))
dualValueMatrix(myData, userid = 11, attr = 1, cost_ids = 1, dual.refps = c(8, 2)) # Note that for cost attributes: SQ > G
dualValueMatrix(data1, 2) # Returns an error since no reference points given
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.