I want to compute cumulative proportions of samples.
R> x=c(92, 3, 1, 4, 15, 4)
R> ecdf(x)(x)
[1] 1.0000000 0.3333333 0.1666667 0.6666667 0.8333333 0.6666667
The above is a way to compute cumulative proportions as shown in the first figure. I think it is for type 7 as the default type of quantile()
is of type 7.
https://blogs.sas.com/content/iml/2017/05/24/definitions-sample-quantiles.html
But I don't find an easy way to compute cumulative proportions for other types. Is thre a function in R to compute cumulative proportions from samples of all the 9 types?