View source: R/critic_weight.R
critic_weight | R Documentation |
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.
critic_weight(X, index = NULL)
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 |
A list containing:
w |
Numeric vector of weights for each indicator. |
s |
Numeric vector of scores for each sample (row), scaled by 100. |
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.