View source: R/quantile.grouped.data.R
quantile.grouped.data | R Documentation |
Sample quantiles corresponding to the given probabilities for objects
of class "grouped.data"
.
## S3 method for class 'grouped.data'
quantile(x, probs = seq(0, 1, 0.25),
names = TRUE, ...)
## S3 method for class 'grouped.data'
summary(object, ...)
x, object |
an object of class |
probs |
numeric vector of probabilities with values
in |
names |
logical; if true, the result has a |
... |
further arguments passed to or from other methods. |
The quantile function is the inverse of the ogive, that is a linear interpolation of the empirical quantile function.
The equation of the quantile function is
x = \frac{c_j (F_n(c_{j - 1}) - q) +
c_{j - 1} (q - F_n(c_j)}{F_n(c_j) - F_n(c_{j - 1})}
for 0 \leq q \leq c_j
and where c_0, \dots,
c_r
are the r + 1
group
boundaries and F_n
is the empirical distribution function of
the sample.
For quantile
, a numeric vector, named if names
is
TRUE
.
For the summary
method, an object of class
c("summaryDefault", "table")
which has specialized
format
and print
methods.
Vincent Goulet vincent.goulet@act.ulaval.ca
ogive
for the smoothed empirical distribution of which
quantile.grouped.data
is an inverse;
mean.grouped.data
and var.grouped.data
to
compute the mean and variance of grouped data.
grouped.data
to create grouped data objects.
data(gdental)
quantile(gdental)
summary(gdental)
Fn <- ogive(gdental)
Fn(quantile(gdental)) # inverse function
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.