norm.gainLoss: Normalizes gain and loss matrices

Description Usage Arguments Details Value References Examples

Description

Returns a list with two elements one is the normalized $gain matrix and the second one is a normalized $loss matrix [1]. It calculates both matrices separately, binds them together with rbind and normalizes both according to the largest value in each column, including values of both matrices. The output style can be changed throught the binded argument. Rows and columns are named.

Usage

1
2
norm.gainLoss(dataset, userid = NULL, attr = NULL, rounds = NULL,
  refps = NULL, cost_ids = NULL, binded = T)

Arguments

dataset

a data.frame with the user generated data from a product configurator. See Details of decisionMatrix for more information about which data should included in this argument.

userid

an integer vector indicating for which user the output of this function should be calculated. This functions is vectorised in this argument, i.e. you may enter more userIDs simultaneously.

attr

attribute IDs, vector of integer numbers corresponding to the attributes (columns) you desire to use.

rounds

integer vector, text option or a list of integer vectors. Which steps of the configuration process should be shown? Defaults are first and last step. Text options are all, first, last. Alternatively, a vector of arbitrarily chosen rounds can be entered as well.

refps

a list of numeric vectors, one for each user. Reference Points: each point corresponds to one attribute, therefore the amount of attributes and of refps entered, should be equal. Default assumes the refps as the default values of the initial product configuration for each user. You may fully or partially enter your own reference points, check below for more info.

cost_ids

argument used to convert selected cost attributes into benefit attributes. Integer vector. Cost type attributes have the characteristic, that a lower value means the user is better off than with a higher value. E.g. price is often considered a cost type attribute. Should be equal to attr input or a subset of it.

binded

logical - Should the gain and loss matrices be outputed in a binded format or separately? Default is true, which returns a single matrix for each user.

Details

If you want to know more details about each parameter, look at gainMatrix, lossMatrix or decisionMatrix.

The function normalizes both gain and loss matrices independently on the amount of rows, for nrow > 1 this works as expected. The problem arises when the matrices have only one row, i.e. one round. This results in normalized matrices which can only contain 0 or 1 as a result, since a positive gain in one specific attribute means a 0 in losses for the same attribute in the loss matrix. Therefore if a gain is bigger than one, when normalizing it ends up being 1 (gain) or -1 (loss) which loses information about the magnitude of the gain and loss, respectively. Definitely a point to be discussed and improved. Please refer to ...p2.

This function is vectorialized in the userid argument.

Value

a list - of normalized gain and loss matrices for each user.

References

[1] Fan, Z. P., Zhang, X., Chen, F. D., & Liu, Y. (2013). Multiple attribute decision making considering aspiration-levels: A method based on prospect theory. Computers & Industrial Engineering, 65(2), 341-350.

Examples

1
2
3
4
5
norm.gainLoss(pc_config_data, 11)
norm.gainLoss(pc_config_data, c(11,12,13,14,15,16,17,18))
norm.gainLoss(myData, 9, rounds=c(1,2,3))
norm.gainLoss(cam4, userid=20:30, refps=c(1.5,1.5,1.5,1.5), rounds="all", binded=F)
norm.gainLoss(data1, 8:16, attr = 1)

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