clusterQp {Qindex} | R Documentation |
Cluster-Specific Sample Quantiles
Description
Sample quantiles in each cluster of observations.
Usage
clusterQp(
formula,
data,
f_sum_ = mean.default,
probs = seq.int(from = 0.01, to = 0.99, by = 0.01),
...
)
Arguments
formula |
formula,
including response
|
data |
|
f_sum_ |
function to summarize the sample quantiles from
lower-level cluster |
probs |
double vector,
probabilities |
... |
additional parameters of function quantile |
Value
Function clusterQp returns an aggregated data.frame, in which
-
the highest cluster
c_1
and cluster-specific covariate(s)x
's are retained.-
If the input
formula
takes form ofy ~ . | c1
ory ~ . - z1 | c1
, then all covariates (except forz_1
) are considered cluster-specific; -
Sample quantiles from lower-level clusters (e.g.,
c_2
) are point-wise summarized using functionf_sum_
.
-
-
response
y
is removed; instead, a double matrix ofN
columns stores the cluster-specific sample quantiles. This matrix-
is named after the parsed expression of response
y
informula
; -
colnames are the probabilities
\mathbf{p}
, for the ease of subsequent programming.
-
Examples
# see ?`Qindex-package` for examples