essHistogram: The Essential Histogram

Description Usage Arguments Details Value References See Also Examples

View source: R/main.R

Description

Compute the essential histogram via (pruned) dynamic programming.

Usage

1
2
essHistogram(x, alpha = 0.5, q = NA, plot = TRUE, verbose = TRUE, 
             xname = deparse(substitute(x)), ...)

Arguments

x

a numeric vector containing the data.

alpha

significance level; if q is missing, q is chosen as the (1-alpha)-quantile of the null distribution of the multiscale statistic via Monte Carlo simulation, see also msQuantile.

q

threshold value.

plot

logical. If TRUE (default), a histogram is plotted, otherwise a list of breaks and counts is returned. In the latter case, a warning is used if (typically graphical) arguments are specified that only apply to the plot = TRUE case.

verbose

logical. If TRUE (default) it prints some details about the computation; otherwise nothing is printed.

xname

a character string with the actual x argument name.

...

further arguments and graphical parameters passed to plot.histogram and thence to title and axis (if plot = TRUE).

Details

The essential histogram is defined as the histogram with least blocks within the multiscale constraint. The one with highest likelihood is picked if there are more than one solutions. The essential histogram involves only one parameter q, the threshold of the multiscale constraint. Such a parameter can be chosen by means of the significance level alpha, which leads to nature statistical significance statements for the multiscale constraint. See Li et al. (2016) for further details.

Value

An object of class "histogram", which is of the same class as returned by function hist.

References

Li, H., Munk, A., Sieling, H., and Walther, G. (2016). The essential histogram. arXiv:1612.07216.

See Also

msQuantile, hist

Examples

1
2
3
4
5
6
7
# simulate data
set.seed(123)
n = 300
x = rnorm(n)

# compute the essential histogram
eh = essHistogram(x, xname = "Gauss")

essHist documentation built on April 9, 2018, 5:04 p.m.