dhisto {benchden} | R Documentation |
4 histogram benchmark densities
Description
Density, distribution function, quantile function and random variate generation for the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010).
Usage
dhisto(x,dnum = 1)
phisto(q,dnum = 1)
qhisto(p,dnum = 1)
rhisto(n,dnum = 1)
Arguments
dnum |
number of distribution as in Rozenholc/Mildenberger/Gather (2010) |
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
number of observations. |
Details
These functions implement the 4 histogram benchmark distributions from Rozenholc/Mildenberger/Gather (2010). Defined as the following mixtures of uniform distributions:
dnum == 1
5 bin regular histogram:
dnum == 2
5 bin irregular histogram:
dnum == 3
10 bin regular histogram:
dnum == 4
10 bin irregular histogram:
where denotes the uniform distribution on
.
Value
dhisto |
gives the density, |
phisto |
gives the distribution function, |
qhisto |
gives the quantile function, and |
rhisto |
generates random deviates. |
Author(s)
Thoralf Mildenberger
References
T. Mildenberger and H. Weinert, "The benchden Package: Benchmark Densities for Nonparametric Density Estimation", Journal of Statistical Software, vol. 46(14), 1-14, 2012. https://www.jstatsoft.org/v46/i14/
Y. Rozenholc, T. Mildenberger and U. Gather (2010), "Combining Regular and Irregular Histograms by Penalized Likelihood", Computational Statistics and Data Analysis, 54, 3313-3323. doi:10.1016/j.csda.2010.04.021 Earlier version including explicit definition of the densities: doi:10.17877/DE290R-15901
Examples
# histogram and true density of "5 bin irregular"-distribution
hist(rhisto(2000,dnum=2),breaks=250, main = " ",freq=FALSE)
lines(seq(0,1,0.01),dhisto(seq(0,1,0.01),dnum=2),col="blue",lwd=1)
title(paste("sample from",nhisto(dnum=2),"density"))