Description Usage Arguments Details Value References Examples
This function is a more basic function than trpValueMatrix
, for a
detailed descrpition, go to trpValueMatrix
. This function is
based on the value function of the tri-reference point (trp) theory. It first
builds a desicion matrix for each user and then applys the trp-value function
over each value using the three given reference points (MR, SQ, G) and other
four free parameters from the value function. See 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 ID, one integer corresponding to the attribute you desire to use; attr are assumed to be 1-indexed. |
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. In this function, should be the same as |
mr |
numeric - Minimum Requirements is the lowest reference point |
sq |
numeric - Status Quo reference point |
g |
numeric - Goal reference point |
beta(s) |
numeric arguments representing the psychological impact of an
outcome equaling failer (_f), loss (_l), gain (_g) or success (_s). Default
values are taken from our reference paper |
This function does the same as trpValueMatrix
but only
for one attribute, for more details please see the mentioned function.
Note: When converting a cost attribute to a benefit attribute its three
reference points change as well, enter the unconverted refps, the function
transforms them automatically when it detects a cost_ids != NULL
a list of value matrices with one attribute for each user.
Wang, X. T.; Johnson, Joseph G. (2012) A tri-reference point theory of decision making under risk. Journal of Experimental Psychology
1 2 3 4 5 6 7 | trpValueMatrix.oneAttr(pc_config_data, 9:15, attr = 15, mr = -1, sq = 0, g = 2.5)
trpValueMatrix.oneAttr(aDataFrame, userid = 100, rounds = "all", attr = 1, mr = 0.5, sq = 1.8, g = 2.5)
trpValueMatrix.oneAttr(myData, 10, attr = 3, cost_ids = 3, mr=4, sq=2, g=0.5) # Note for cost_ids mr > sq > g
# Return an error, 1.Too many attributes or 2. none entered
trpValueMatrix.oneAttr(keyboard_data, 8:9 , attr = c(10,12,14,16), mr = 0.5, sq = 1.8, g = 2.5)
trpValueMatrix.oneAttr(data1, 2) # 2. No attribute entered
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.