ash: Average Shifted Histograms From a Histogram.

Description Usage Arguments Details Author(s) References See Also Examples

Description

Computes a univariate average shifted histogram (polynomial kernel) given a single input histogram.

Usage

1
HistToASH(h, m=5, kopt=c(2,2))

Arguments

h

A histogram object (created by hist) representing a pre-binned dataset.

m

optional integer smoothing parameter, passed to ash1().

kopt

vector of length 2 specifying the kernel, passed to ash1().

Details

This function takes a histogram and uses the counts as the input to the ash1() function in the ash package to compute the average shifted histogram.

Author(s)

Murray Stokely mstokely@google.com

References

Scott, David W. Multivariate density estimation: theory, practice, and visualization. Vol. 383. Wiley. com, 2009.

See Also

histogramtools-package, ash1, and hist.

Examples

1
2
3
4
5
6
x <- runif(1000, min=0, max=100)
h <- hist(x, breaks=0:100, plot=FALSE)
plot(h, freq=FALSE)

# Superimpose the Average Shifted Histogram on top of the original.
lines(HistToASH(h), col="red")

Example output

[1] "ash estimate nonzero outside interval ab"

HistogramTools documentation built on May 2, 2019, 1:08 p.m.