This project has moved and is read-only. For the latest updates, please go here.

looking for similar Excel PERCENTRANK function in Math.Net

Dec 28, 2013 at 6:17 PM

I am looking for a Excel PERCENTRANK function in, but could not find it. Only found the Quantile/Percentile functions, but I need the input parameter to be the value for which I want to know the rank, instead of tau. Any help would be greatly appreciated!
Dec 30, 2013 at 2:05 PM

It was not available, but I've just added ExcelFunctions.PERCENTRANK in master, will be part of the next alpha release.

In practice, especially if you want to evaluate it for multiple x values, you'd probably want to sort the array and use the proper QuantileRank directly instead:
var tau1 = SortedArrayStatistics.QuantileRank(data, x1, RankDefinition.Min);
var tau2 = SortedArrayStatistics.QuantileRank(data, x2, RankDefinition.Min);
var percentrank = Statistics.QuantileRankFunc(data, RankDefinition.Min);
var tau1 = percentrank(x1);
var tau2 = percentrank(x2);
Marked as answer by cdrnet on 12/30/2013 at 6:43 AM
Dec 30, 2013 at 3:22 PM
Hi Chris,

Thanks for your reply! However, I am unable to find the SortedArrayStatistics.QuantileRank or Statistics.QuantileRankFunc under MathNet.Numerics.Statistics. Are these two functions already implemented or will be part of the next release?


Dec 30, 2013 at 3:49 PM
Hi Charlie,

They are implemented in current master and will be part of the next alpha release (v3.0.0-alpha7) which I plan to release either later today or within a few days.

Dec 30, 2013 at 3:52 PM
Hi Chris,

Thanks for your quick response! I look forward to the new release! I really appreciate your great work!!