Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/weighted.quantile.R
A weighted cdf is calculated and quantiles are evaluated. Missing values are discarded.
1 | weighted.quantile(x, w, prob = 0.5, plot = FALSE)
|
x |
vector of data |
w |
vector of (sampling) weights |
prob |
The probability for the quantile |
plot |
if |
Weighted linear interpolation in case of non-unique inverse. Gives a warning when the contribution of the weight of the smallest observation to the total weight is larger than prob
.
The quantile for proporiont prob
.
No variance calculation.
Beat Hulliger
1 2 3 4 | x<-rnorm(100)
x[sample(1:100,20)]<-NA
w<-rchisq(100,2)
weighted.quantile(x,w,0.2,TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.