cv_weight | R Documentation |
Computes weights for indicators using the Coefficient of Variation (CV) method. Weights are derived by normalizing the CV (standard deviation divided by mean) for each indicator.
cv_weight(X)
data |
Numeric matrix or data frame with positive indicator data. |
The cv_weight
function calculates weights using the CV method.
For each column in data
, the CV is computed as the standard deviation
divided by the mean. Weights are obtained by normalizing the CVs to sum to 1.
This lightweight implementation uses base R and assumes all columns are numeric
indicators.
Numeric vector of weights for the indicators, summing to 1.
X = data.frame(x1 = c(10, 20, 15), x2 = c(5, 10, 8))
cv_weight(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.