trpValueMatrix: (Deprecated)Returns a Value Matrix using three reference...

Description Usage Arguments Details Value References Examples

Description

*Unless you have a special reason to do so, you should use trp.valueMatrix

Usage

1
2
3
trpValueMatrix(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 IDs, vector of integer numbers corresponding to the attributes 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. Integer vector.

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 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.

This function only makes sense to use with multiple attributes if those attributes have exactly the same three reference points (mr, sq, g). Therefore you will have to manually calculate all the value matrices for the different attributes (with different values) and cbind them together using mapply. The full matrix can then be given as an input to the overallPV_interface fucntion to calculate the overall prospect values for each round.

General: The value matrix has ncol = number of attributes you selected or all(default) and nrow = number of rounds you selected or the first and last(default) for all selected users.

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).

About reference points with cost_ids: 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.

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 for each user.

References

[1]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
trpValueMatrix(pc_config_data, 9:11, mr = 0.5, sq = 2, g = 4.7)
trpValueMatrix(aDataFrame, userid = 100, rounds = "all", mr = 0.5, sq = 1.8, g = 2.5)
trpValueMatrix(my_data, userid = 11, attr = c(1,3,5), cost_ids = 2) #Input accepted but cost_ids = 2 will be ignored
trpValueMatrix(my_data, userid = 11, attr =  1, cost_ids = 1, mr = 10, sq = 5, g =3) # Note that for cost attributes: MR > SQ > G
trpValueMatrix(keyboard_data, 60, rounds = "first", attr=1, mr = 0.5, sq = 1.8, g = 2.5, beta_f = 6)
trpValueMatrix(data1, 2) # Returns an error since no reference points entered (mr, sq, g)

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