apply.REGIME: Apply REGIME method (using a beneficial.vector)

View source: R/REGIME.R

apply.REGIMER Documentation

Apply REGIME method (using a beneficial.vector)

Description

This function implements the REGIME method of pairwise comparisons to produce a character matrix (cp.matrix) that marks each pair of alternatives as either "P+" (row dominates column), "I" (indifferent), or "-" (for diagonals).

Usage

apply.REGIME(mat, beneficial.vector, weights, doPreOrder = FALSE)

Arguments

mat

A numeric matrix of size n x m (n alternatives, m criteria).

beneficial.vector

An integer vector of columns that are beneficial ("max"). All other columns are assumed to be "min".

weights

A numeric vector of length m, containing weights for each criterion.

doPreOrder

A logical. If TRUE, the function also calls apply.po.ranking on the resulting cp.matrix and returns both the matrix and the partial-order results in a list.

Details

It uses a beneficial.vector of column indices for "max" criteria. Columns not in beneficial.vector are treated as "min". The function can optionally run apply.po.ranking on the resulting matrix for partial-order analysis.

  1. Weights Normalization: We first normalize the weights so their sum equals 1.

  2. Pairwise Comparison Matrix (g_ind):

    • For each pair of alternatives and each criterion:

      • If the criterion is beneficial (maximization) and the value for one alternative is greater than or equal to the value for another alternative, the weight for that criterion is added to the pair's comparison score (g_ind). Otherwise, the weight is subtracted from the score.

      • If the criterion is non-beneficial (minimization) and the value for one alternative is less than the value for another alternative, the weight is added to the score. Otherwise, the weight is subtracted.

  3. cp.matrix:

    • "P+" indicates that one alternative dominates another if the comparison score (g_ind) is greater than 0.

    • "I" indicates that the alternatives are indifferent if the comparison score is 0 or if the scores for both directions are equal.

    • "-" is assigned to diagonal entries, where the alternatives are compared with themselves.

  4. If doPreOrder = TRUE, the function calls apply.po.ranking on cp.matrix to merge indifferent alternatives ("I") and construct a partial order.

Value

  • If doPreOrder = FALSE, returns an n x n character matrix cp.matrix.

  • If doPreOrder = TRUE, returns a list with two elements:

    • cp.matrix: the character matrix

    • po.result: the output from apply.po.ranking

Examples

# Example data: 3 alternatives x 2 criteria
mat <- matrix(c(10, 5,
                12, 4,
                11, 6), nrow = 3, byrow = TRUE)

# Suppose first column is beneficial, second is non-beneficial
benef.vec <- c(1)  # means col1 is "max", col2 is "min"
wts <- c(0.6, 0.4)

# Call apply.REGIME without partial-order
regime.out <- apply.REGIME(mat, benef.vec, wts, doPreOrder = FALSE)


# Or with partial-order
regime.out2 <- apply.REGIME(mat, benef.vec, wts, doPreOrder = TRUE)


RMCDA documentation built on June 8, 2025, 11:14 a.m.