trpValueMatrix.oneAttr: Returns a Value Matrix using three reference points (one...

Description Usage Arguments Details Value References Examples

Description

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.

Usage

1
2
3
trpValueMatrix.oneAttr(dataset, userid = NULL, attr = NULL, rounds = NULL,
  cost_ids = NULL, mr = NULL, sq = NULL, g = NULL, beta_f = 5,
  beta_l = 1.5, beta_g = 1, beta_s = 3)

Arguments

dataset

data.frame with the user generated data from a product configurator. See decisionMatrix for specifications of the dataset.

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 all, first, last.

cost_ids

argument used to convert selected cost attributes into benefit attributes. In this function, should be the same as attr. For a cost attribute it should be true, that a lower value is better for the user, this should also hold for the three reference points. So contrary to normal/benefit attributes for cost attributes reference points should follow that: mr > sq > g.

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 (5,1,1,3).

Details

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

Value

a list of value matrices with one attribute for each user.

References

Wang, X. T.; Johnson, Joseph G. (2012) A tri-reference point theory of decision making under risk. Journal of Experimental Psychology

Examples

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

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