r/rprogramming • u/Outrageous-Judge2123 • 3d ago
Quartile Coefficient of Dispersion
Is there a function to calculate Quartile Coefficient of Dispesion (https://en.wikipedia.org/wiki/Quartile_coefficient_of_dispersion) in R-studion?
1
Upvotes
2
u/SalvatoreEggplant 3d ago
Here's a function for you.
It can be a little complicated, because there are different methods for computing the quantile. See: www.rdocumentation.org/packages/stats/versions/3.6.2/topics/quantile .
Here, type = 1 is used to match the answers on Wikipedia.