Say I have height measurements of Earth's population expressed with a precision of integer centimetres.
In terms for this example that uses frequency weights, is there a numerical method to calculate q-tiles from a data set weighted by the cardinality of its entries?
More generally, how do I find the percentile p (or quantile q) from a weighted dataset that uses weights of any kind, e.g. frequency, sampling, IPTW, IPSW, etc.?
Is there a formula, such as something that I could implement in R, other than expanding this into a pseudo-dataset with ten billion values?