quantiles From Sorted Data
fun quantilesFromSortedData(sortedData: DoubleArray, p: DoubleArray = doubleArrayOf(0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95)): DoubleArray
Uses definition 7, as per R definitions
Return
the quantiles associated with each value of p. The default values for p are 0.05, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.95
Parameters
sorted Data
the array of data. It is assumed that the data is already sorted. This requirement is not checked!
p
the percentile array, each element must be within (0, 1)