Aggregates a data frame of indicator values into a single column using the Copeland method.
This function calls outrankMatrix()
.
Arguments
- X
A numeric data frame or matrix of indicator data, with observations as rows and indicators as columns. No other columns should be present (e.g. label columns).
- w
A numeric vector of weights, which should have length equal to
ncol(X)
. Weights are relative and will be re-scaled to sum to 1. Ifw
is not specified, defaults to equal weights.
Details
The outranking matrix is transformed as follows:
values > 0.5 are replaced by 1
values < 0.5 are replaced by -1
values == 0.5 are replaced by 0
the diagonal of the matrix is all zeros
The Copeland scores are calculated as the row sums of this transformed matrix.
This function replaces the now-defunct copeland()
from COINr < v1.0.
Examples
# some example data
ind_data <- COINr::ASEM_iData[12:16]
# aggregate with vector of weights
outlist <- outrankMatrix(ind_data)
#> No weights specified for outranking matrix, using equal weights.