Package 'WtTopsis'

Title: Weighted Method for Multiple-Criteria Decision Making
Description: Evaluation of alternatives based on multiple criteria using weighted technique for Order preference by similarity to an ideal solution method. Reference: Hwang CL. (1981, ISBN:978-3-540-10558-9).
Authors: zhengyu wu [aut, cre, ctb]
Maintainer: zhengyu wu <[email protected]>
License: MIT + file LICENSE
Version: 1.0
Built: 2025-02-13 03:56:47 UTC
Source: https://github.com/zhengyu888/wttopsis

Help Index


data2max Maximized the data.

Description

data2max Maximized the data.

Usage

data2max(data, mth, zmth, xbest, qlow, qup)

Arguments

data

The Data that needs to be maximized.

mth

A vector describing the type of each indicator.

zmth

A vector describing the method from negative to positive, including DS: reciprocal method, it is not recommended to use when the data has 0, CZ: using the maximum subtraction method, other types of indicators are marked as NA.

xbest

An optimal value vector of intermediate numerical values,other types of indicators are marked as NA.

qlow

An interval lower bound vector with interval numeric value forward,other types of indicators are marked as NA.

qup

An interval upper bound vector of the interval value maximize,other types of indicators are marked as NA.

Value

A maximized data set

Examples

sampleData<-sampleData
mth<-c("ZH","ZJ","QJ","ZH","FU","ZH","QJ","FU","FU","ZH")
zmth<-c(NA,NA,NA,NA,"CZ",NA,NA,"DS","CZ",NA)
xbest<-c(NA,4,NA,NA,NA,NA,NA,NA,NA,NA)
qup<-c(NA,NA,5,NA,NA,NA,5,NA,NA,NA)
qlow<-c(NA,NA,3,NA,NA,NA,3,NA,NA,NA)
data2max(sampleData,mth,zmth,xbest,qlow,qup)

DataNormal Normalize the maximized data set.

Description

DataNormal Normalize the maximized data set.

Usage

DataNormal(data)

Arguments

data

A maximized data set

Value

A Normalized data set

Examples

## Not run: 
sampleData<-sampleData
mth<-c("ZH","ZJ","QJ","ZH","FU","ZH","QJ","FU","FU","ZH")
zmth<-c(NA,NA,NA,NA,"CZ",NA,NA,"DS","CZ",NA)
xbest<-c(NA,4,NA,NA,NA,NA,NA,NA,NA,NA)
qup<-c(NA,NA,5,NA,NA,NA,5,NA,NA,NA)
qlow<-c(NA,NA,3,NA,NA,NA,3,NA,NA,NA)
maxdata<-data2max(sampleData,mth,zmth,xbest,qlow,qup)
DataNormal(maxdata)

## End(Not run)

DataNormalpre Prepare the normalized data set.

Description

DataNormalpre Prepare the normalized data set.

Usage

DataNormalpre(data, i)

Arguments

data

A maximized data set

i

Index column

Value

Index column normalized


Ejcaul Calculate Ej value.

Description

Ejcaul Calculate Ej value.

Usage

Ejcaul(data, i)

Arguments

data

A normalized data set.

i

Index column.

Value

Index column weight Ej


Errmax Function on error.

Description

Errmax Function on error.

Usage

Errmax(x, i)

Arguments

x

The Data that needs to be maximized.

i

Index column.

Value

Index column maximized.


GetWeight Calculate weights on standardized data us the entropy method.

Description

GetWeight Calculate weights on standardized data us the entropy method.

Usage

GetWeight(data)

Arguments

data

A Normalized data set

Value

WeightEij is Ej value of Index,weight is weight value of Index

Examples

sampleData<-sampleData
mth<-c("ZH","ZJ","QJ","ZH","FU","ZH","QJ","FU","FU","ZH")
zmth<-c(NA,NA,NA,NA,"CZ",NA,NA,"DS","CZ",NA)
xbest<-c(NA,4,NA,NA,NA,NA,NA,NA,NA,NA)
qup<-c(NA,NA,5,NA,NA,NA,5,NA,NA,NA)
qlow<-c(NA,NA,3,NA,NA,NA,3,NA,NA,NA)
weightdata<-data2max(sampleData,mth,zmth,xbest,qlow,qup)
GetWeight(weightdata)

max2max positive Data conversion.

Description

max2max positive Data conversion.

Usage

max2max(x, i)

Arguments

x

The Data that needs to be maximized.

i

Index column.

Value

Index column maximized


min2maxC negative Data conversion use Maximum subtraction method

Description

min2maxC negative Data conversion use Maximum subtraction method

Usage

min2maxC(x, i)

Arguments

x

The Data that needs to be maximized.

i

Index column.

Value

Index column maximized


min2maxD negative Data conversion use reciprocal method

Description

min2maxD negative Data conversion use reciprocal method

Usage

min2maxD(x, i)

Arguments

x

The Data that needs to be maximized.

i

Index column.

Value

Index column maximized


qj2max Interval Data conversion

Description

qj2max Interval Data conversion

Usage

qj2max(x, qlow, qup, i)

Arguments

x

The Data that needs to be maximized.

qlow

An interval lower bound vector with interval numeric value forward,other types of indicators are marked as NA.

qup

An interval upper bound vector of the interval value maximize,other types of indicators are marked as NA.

i

Index column.

Value

Index column maximized


A example of multiple-criteria decision making data.

Description

A example of multiple-criteria decision making data.

Usage

sampleData

Format

A data fram with 21 rows and 11 variables.

Source

Randomly generated.


WtTopsis Weighted TOPSIS method for multiple-criteria decision making (MCDM).

Description

WtTopsis Weighted TOPSIS method for multiple-criteria decision making (MCDM).

Usage

WtTopsis(data, mth, zmth, xbest, qlow, qup)

Arguments

data

The Data that needs to be maximized.

mth

A vector describing the type of each indicator.

zmth

A vector describing the method from negative to positive, including DS: reciprocal method, it is not recommended to use when the data has 0, CZ: using the maximum subtraction method, other types of indicators are marked as NA.

xbest

An optimal value vector of intermediate numerical values,other types of indicators are marked as NA.

qlow

An interval lower bound vector with interval numeric value forward,other types of indicators are marked as NA.

qup

An interval upper bound vector of the interval value maximize,other types of indicators are marked as NA.

Value

Data set containing D+,D- and C values

Examples

sampleData<-sampleData
mth<-c("ZH","ZJ","QJ","ZH","FU","ZH","QJ","FU","FU","ZH")
zmth<-c(NA,NA,NA,NA,"CZ",NA,NA,"DS","CZ",NA)
xbest<-c(NA,4,NA,NA,NA,NA,NA,NA,NA,NA)
qup<-c(NA,NA,5,NA,NA,NA,5,NA,NA,NA)
qlow<-c(NA,NA,3,NA,NA,NA,3,NA,NA,NA)
WtTopsis(sampleData,mth,zmth,xbest,qlow,qup)

WtTopsis Weighted TOPSIS method for multiple-criteria decision making (MCDM) us Normalized data.

Description

WtTopsis Weighted TOPSIS method for multiple-criteria decision making (MCDM) us Normalized data.

Usage

WtTopsisN(data)

Arguments

data

Normalized data.

Value

Data set containing D+,D- and C values

Examples

sampleData<-sampleData
mth<-c("ZH","ZJ","QJ","ZH","FU","ZH","QJ","FU","FU","ZH")
zmth<-c(NA,NA,NA,NA,"CZ",NA,NA,"DS","CZ",NA)
xbest<-c(NA,4,NA,NA,NA,NA,NA,NA,NA,NA)
qup<-c(NA,NA,5,NA,NA,NA,5,NA,NA,NA)
qlow<-c(NA,NA,3,NA,NA,NA,3,NA,NA,NA)
maxdata<-data2max(sampleData,mth,zmth,xbest,qlow,qup)
normaldata<-DataNormal(maxdata)
WtTopsisN(normaldata)

zj2max Intermediate Data conversion

Description

zj2max Intermediate Data conversion

Usage

zj2max(x, xbest, i)

Arguments

x

The Data that needs to be maximized.

xbest

An optimal value vector of intermediate numerical values,other types of indicators are marked as NA.

i

Index column.

Value

Index column maximized