Learn R Programming

generalCorr (version 1.2.0)

summaryRank: Compute ranks of rows of matrix and summarize them into a choice suggestion.

Description

This function allows getting out the choice (of column stock) from four rows of numbers quantifying the four orders of exact stochastic dominance comparisons. If the choice row has 1 then that column is to be chosen with the largest (portfolio) weight. If the original matrix row names exist, same are repeated for the extra rows representing the ranks. The row name for sum of ranks is sumRanks and the ranking of the sumRanks providing the choice is named choice along the bottom row of the output matrix called "out."

Usage

summaryRank(mtx)

Arguments

mtx

matrix to be ranked by row and summarized

Value

a matrix appending 4 more rows of ranks and a couple of rows summarizing ranks and also choice priority number for each stock (asset)