| Title: | A Most Informative Histogram-Like Model |
|---|---|
| Description: | Using the MDL principle, it is possible to estimate parameters for a histogram-like model. The package contains the implementation of such an estimation method. |
| Authors: | Jouke Witteveen |
| Maintainer: | Jouke Witteveen <[email protected]> |
| License: | GPL (>= 2) |
| Version: | 0.7-1 |
| Built: | 2026-05-12 05:37:19 UTC |
| Source: | https://github.com/joukewitteveen/histmdl |
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.
histmdl(x, model = "Witteveen", gain = 0, precision = 0, support = 4, plot = TRUE, main = paste("Histogram of", xname), xlab = xname, ylab = "Density", ...)histmdl(x, model = "Witteveen", gain = 0, precision = 0, support = 4, plot = TRUE, main = paste("Histogram of", xname), xlab = xname, ylab = "Density", ...)
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 |
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 |
Jouke Witteveen and Richard Gill
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")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")