Description Usage Arguments Details
This set of functions allows you to compute weighted quantiles.
qq
returns the quantile from a sequence of values with associated
probabilities. qfun
computes unweighted quantiles using qq
,
and wqfun
computes the weighted quantiles given some weight for
the different values. quantfun
computes weighted quantiles for an
array of input data with equal weight to rows (and allowing for missing
values in the columns).
1 2 3 4 5 6 7 |
x |
numerical input (vector or matrix for |
initw |
initial weight for individual rows in |
quants |
multiple quantiles to be computed |
type |
Assumptions on how quantiles are calculated (see details) |
px |
probability of values in |
p |
quantile to be computed computed |
weights |
weights for the values in |
The different type
s govern the probabilities associated with
the sequence of ordered values. type = 1
sets the probability of
the minimum to 0.5/n
where n
is the number of values in
x
, whereas type = 2
sets the probability of the minimum
to 0
. In both cases the 0th and 100th percentile correspond to the
minimum and maximum of the values in x
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.