apply.MACBETH: Apply MACBETH (Measuring Attractiveness by a Categorical...

View source: R/MACBETH.R

apply.MACBETHR Documentation

Apply MACBETH (Measuring Attractiveness by a Categorical Based Evaluation TecHnique)

Description

Apply MACBETH (Measuring Attractiveness by a Categorical Based Evaluation TecHnique)

Usage

apply.MACBETH(mat, beneficial.vector, weights)

Arguments

mat

A numeric matrix where rows represent alternatives and columns represent criteria.

beneficial.vector

An integer vector containing column indices for the beneficial (larger-is-better) criteria. Columns not in beneficial.vector are treated as non-beneficial (smaller-is-better).

weights

A numeric vector of the same length as the number of columns in mat, containing the relative importance weights for each criterion.

Value

A numeric vector V of length nrow(mat), the final attractiveness scores.

Examples

# Example matrix: 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)
wts <- c(0.6, 0.4)

# Get MACBETH scores
res <- apply.MACBETH(mat, benef.vec, wts)



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