histmdl {histmdl} | R Documentation |
Most Informative Histograms
Description
Compute an estimate of the maximum likelihood parameter of a
histogram-like model. If plot=TRUE
, the resulting object of
class "histogram"
is plotted according to
plot.histogram
, before it is returned.
Usage
histmdl(x, model = "Witteveen", gain = 0, precision = 0, support = 4,
plot = TRUE, main = paste("Histogram of", xname),
xlab = xname, ylab = "Density", ...)
Arguments
x |
a vector of values for which the histogram is desired. |
model |
a character string naming the desired histogram-like
model. Currently, only |
gain |
minimum required complexity reduction before an additional interval is accepted. |
precision |
a value giving the minimum resolution of the data. When computing complexities, boundary values are blurred by this amount to mitigate the effects of, for example, rounding. |
support |
minimum number of data points desired per interval. |
plot |
logical. If |
main , xlab , ylab |
these arguments to |
... |
further arguments and graphical parameters passed
to |
Value
an object of class "histogram"
which is a list of components:
breaks |
the boundaries of intervals. Note that consecutive values are not the same as the boundaries of the intervals that, recursively, define the model instance. |
density |
densities of the data inside the model-interval that a section is part of. |
xname |
a character string with the actual |
Author(s)
Jouke Witteveen and Richard Gill
See Also
Examples
set.seed (28011988)
x <- c (rnorm (1000, -6), rnorm (1000, 6))
histmdl (x, gain=2, col="peru")
hist (x, freq=FALSE, add=TRUE, col="#80808080")
x <- c (runif (50), runif (50, max=3))
histmdl (x, col="peru", ylim=0:1)
hist (x, freq=FALSE, add=TRUE, col="#80808080")