critic_weight: CRITIC Weight Method for Indicator Weighting and Sample...

View source: R/critic_weight.R

critic_weightR Documentation

CRITIC Weight Method for Indicator Weighting and Sample Scoring

Description

Computes objective weights of indicators and scores of samples using the CRITIC method. The method considers both the variance (contrast intensity) and correlation (conflict among indicators) to determine indicator importance.

Usage

critic_weight(X, index = NULL)

Arguments

X

A numeric data frame or matrix where rows represent samples (observations) and columns represent indicators (variables).

index

A character vector indicating the direction of each indicator. Use "+" for positive indicators (higher is better) and "-" for negative indicators (lower is better). If not provided, all indicators are assumed to be positive.

Value

A list containing:

w

Numeric vector of weights for each indicator.

s

Numeric vector of scores for each sample (row), scaled by 100.

Examples

# Example: Using CRITIC method on a simple dataset
X = data.frame(
  x1 = c(3, 5, 2, 7),
  x2 = c(10, 20, 15, 25)
)
index = c("+", "-")
critic_weight(X, index)

zhjx19/mathmodels documentation built on June 2, 2025, 12:18 a.m.