kish_ess | R Documentation |
Computes weighted quantiles. whdquantile()
uses a weighted
Harrell-Davis quantile estimator. wthdquantile()
uses a weighted
trimmed Harrell-Davis quantile estimator. wquantile()
uses a weighted
traditional quantile estimator.
kish_ess(w)
wquantile_generic(x, w, probs, cdf)
whdquantile(x, w, probs)
wthdquantile(x, w, probs, width = 1/sqrt(kish_ess(w)))
wquantile(x, w, probs, type = 7)
w |
Numeric vector of weights to give each value. Should be the same length as the vector of values. |
x |
Numeric vector of values of which to determine the quantiles. |
probs |
Numeric vector of the quantiles to retrieve. |
cdf |
Cumulative distribution function. |
width |
Numeric value for the width of the interval in the trimmed Harrell-Davis quantile estimator. |
type |
Numeric value for type of weighted quantile. |
Computes weighted quantiles according to Akinshin (2023).
Numeric vector of specified quantiles.
Other computations:
Mode()
,
meanSum()
,
mySum()
mydata <- c(1:100, 1000)
mydataWithNAs <- mydata
mydataWithNAs[c(1,5,7)] <- NA
weights <- rep(1, length(mydata))
quantiles <- c(0.01, 0.05, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99)
whdquantile(
x = mydata,
w = weights,
probs = quantiles)
wthdquantile(
x = mydata,
w = weights,
probs = quantiles)
wquantile(
x = mydata,
w = weights,
probs = quantiles)
whdquantile(
x = mydataWithNAs,
w = weights,
probs = quantiles)
wthdquantile(
x = mydataWithNAs,
w = weights,
probs = quantiles)
wquantile(
x = mydataWithNAs,
w = weights,
probs = quantiles)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.