apply.SMART: Apply the SMART Method

View source: R/SMART.R

apply.SMARTR Documentation

Apply the SMART Method

Description

This function implements the SMART (Simple Multi-Attribute Rating Technique) method in R.

Usage

apply.SMART(dataset, grades, lower, upper, beneficial.vector)

Arguments

dataset

A numeric matrix or data frame of size (n x m), rows = alternatives, columns = criteria.

grades

A numeric vector of length m (one grade per criterion). They get transformed into weights via (2^{1/2})^{grades} and normalized.

lower

A numeric vector of length m with lower bounds for each criterion.

upper

A numeric vector of length m with upper bounds for each criterion.

beneficial.vector

A numeric vector containing column indices that are beneficial ("max").

Value

A matrix (or data frame) named result with two columns: The row index (alternative) and the final SMART score for that alternative.

The rows of result are sorted by score in descending order.

Examples

# Example usage
data_mat <- matrix(c(10, 20, 15,  7,
                     30,  5,  8, 25),
                   nrow = 2, byrow = TRUE)
# Suppose we have 4 criteria (2 rows, 4 columns)
# We'll treat columns 1, 2, 3 as beneficial, and column 4 as non-beneficial
benef_vec <- c(1, 2, 3)

# Grades for each of 4 criteria
grades <- c(2, 2, 1, 3)
lower  <- c(0, 0, 0,  0)
upper  <- c(40, 40, 40, 40)

# Run SMART
result <- apply.SMART(dataset = data_mat,
                    grades = grades,
                    lower  = lower,
                    upper  = upper,
                    beneficial.vector = benef_vec)

result


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