sensitivity: sensitivity

Description Usage Arguments Details Value Author(s) Examples

Description

A function to perform the sensitivity on a data.frame in read data matrix format. The spirit behind this function is to interpretively take in the given parameters of a specified read data matrix style data.frame and populate a database. From this database, the user can pivot, plot, and reshape for appropriate analysis in deciding what different weighting schemes might have looked like for the decision maker. This function is meant to scale between various methods as well as attributes. Custom split separation is available for each sensitivity step. Custom step sizes are also available to allow the user to do multiple sensitivity runs and determine what fidelity the sensitivty is needed to make an impact on the overarching decision.

Usage

1
2
3
sensitivity(data = c(), algs = c("TOPSIS", "MAUT"), algParams = c(),
  step = 0.01, window = c(), attr = c(), splitPercentages = "uniform",
  verbose = FALSE, plotLabels = FALSE)

Arguments

data,

read data matrix(data.frame), data.frame in data matrix format.

algs,

vector to specify the algorithms with which to use,

algParams,

list of named vectors,

step,

automatically set to 0.01 is the steps you want an attribute to climb up or down.

window,

double or vector or list, a sigle value represents how low to go for a weight on an attribute being studied, i.e weight-window. likewise for how high, weight+window. for the vector and list situation it is nothing more than a substitute for the lower and upper bound of default, i.e., (step, 1-step) next will be assessed.

attr,

automatically set to c() will trigger a full sensitivity accross all attributes. If a list of valid attribuets are provided, the sensitivity will only trigger these attributes in the sensitivity and reflect them only in the returned database.

splitPercentages,

automatically set to uniform. This means as you incrementally increase and decrease an attributes weight value, the percetnage given to each other attribute is equal. An example would be with 3 attributes, we toggle attribute2 down from 0.3 to 0.2. So we lost 0.1 from attribute2, so we will take 0.1/(3-1) to give us 0.1/2==0.05, therefore attribuet1 and attribute2 will increase by 0.05 when attribute2 goes down 0.1. The generalization to this is step/(1-N) in the algorithm.

verbose,

default to FALSE. As with most linux command line applications, this will give you a highly detailed picture of what type of iterations are taking place under the hood.

plotLabels,

boolean to specify how you would like the ggplot2 object to be returned (points or labels).

Details

Import libraries

Value

named list

Author(s)

Blake Conrad bmc.cs@outlook.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## load up some test data
data(maut_dm)
data(topsis_dm)

## Get a baseline for ranking
TOPSIS(maut_dm)$Results
MAUT(maut_dm)$Results

## Run Sensitivity (I.e., step defaults, algs defaults, algParams defaults, attr 
#                   defaults. All of which can be tweaked.)
FinalDB <- sensitivity(data=maut_dm)
FinalDB$Results          # Output from all the runs
FinalDB$EdgeCasesResults # Show all of the cases in Final_DB$Results when rank changed
FinalDB$Plot


## Take another look at sensitivity results
FinalDB <- sensitivity(data=topsis_dm,
                       step=0.1,
                       algs=c("TOPSIS","MAUT"),
                       algParams=list(MAUT=list(scales=list("linear",
                                                            "linear",
                                                            "linear",
                                                            "exponential",
                                                            "exponential",
                                                            "exponential",
                                                            "linear"))))
FinalDB$Plot

conradbm/madmR documentation built on May 28, 2019, 4:35 p.m.