sample_qtls: Generate random draws based on empirical c.d.f.
Description
Generate random draws from a set of quantiles, based on the empirical
cumulative density function
Usage
sample_qtls(n, probs, qtls)
Value
a numeric vector, with random draws of the approximated distribution
underpinning the provided quantiles
Arguments
n
integer, the number of draws to generate
probs
numeric vector, the probabilities
qtls
numeric vector, the quantiles for the probabilities
specified in probs
Details
Based on the Inverse Transform Sampling technique, by sampling
random probabilities from a uniform distribution and interpolate (cubic)
the count samples from the percentiles provided by the user (taken as the
empirical cumulative density function)