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 y, cluster(s) c's, cluster-specific covariate(s) x's to be retained, and cluster-specific covariate(s) z's to be removed from data, e.g.,

y ~ 1 | c1

cluster c_1, without cluster-specific covariate

y ~ 1 | c1/c2

cluster c_1, and cluster c_2 nested in c_1, without cluster-specific covariate

y ~ x1 + x2 | c1

cluster c_1, and cluster-specific covariates x_1 and x_2

y ~ . | c1

cluster c_1, and all (supposedly cluster-specific) covariates from data

y ~ . - z1 - z2 | c1

cluster c_1, and all (supposedly cluster-specific) covariates, except for z_1 and z_2, from data

data

data.frame

f_sum_

function to summarize the sample quantiles from lower-level cluster c_2 (if present), such as mean.default (default), median.default, max, min, etc.

probs

double vector, probabilities \mathbf{p} = (p_1,\cdots,p_N)' shared across all clusters, where the cluster-specific sample quantiles of response y are calculated. Default seq(.01, .99, by = .01)

...

additional parameters of function quantile

Value

Function clusterQp returns an aggregated data.frame, in which

Examples

# see ?`Qindex-package` for examples

[Package Qindex version 0.1.7 Index]