Learn R Programming

probhat (version 0.3.1)

74_order-based_statistics: Order-Based Statistics

Description

Compute named sequential quantiles, primarily for producing summary-style output.

Usage

ntile.names (symbol="q", n, …, emph = n / 2)

quartiles (xf, col=FALSE, …, rank=TRUE, names = ntile.names ("Q", 4, emph=emph), emph=2) deciles (xf, col=FALSE, …, rank=TRUE, names = ntile.names ("D", 10, emph=emph), emph=5)

ntiles (xf, n, col=FALSE, …, rank=TRUE, names)

Arguments

symbol

String, letter/symbol for the quantile names.

n

Integer, the number of sequential quantiles.

xf

A numeric vector, suitable function object, or an object that can be coerced to a numeric vector. Here, a suitable function object is a quantile function. Refer to the references and see also sections.

col

Logical, if true, return a single-column matrix.

rank

Logical, if true, name quantiles by index/names, if false, name quantiles by probability.

names

Character vector, giving the names. Ignored, if rank is false.

emph

In principle, an integer vector in 1:(n-1), which quantiles to emphasize. Can also be a numeric vector, but the floor/ceiling values are used.

Other arguments. Refer to details.

Value

ntiles.names returns a character vector.

The other functions return a named numeric vector (if col=FALSE), or a named single-column matrix (if col=TRUE).

Details

If xf is a numeric vector, a qfuv.el object is created using xf as the main argument. Any arguments contained within …, are passed to the qfuv.el constructor.

If xf is not a quantile function, these functions try to coerce it to a numeric vector, and apply the above.

References

Refer to the vignette for an overview, references and better examples.

See Also

Succinct Constructors Discrete Kernel Smoothing, Continuous Kernel Smoothing, Empirical-Like Distributions

probmv, rng

ph.mean, moment ph.median, ph.quantile ph.mode, ph.modes

Examples

Run this code
# NOT RUN {
ph.data.prep ()

cFht <- qfuv.cks (height)

quartiles (cFht)
quartiles (cFht, rank=FALSE)

quartiles (height)
# }

Run the code above in your browser using DataLab