dberdev: 28 benchmark densities from Berlinet/Devroye (1994)

dberdevR Documentation

28 benchmark densities from Berlinet/Devroye (1994)

Description

Density, distribution function, quantile function and random variate generation for the 28 distributions from Berlinet/Devroye (1994).

Usage

dberdev(x,dnum = 1)
pberdev(q,dnum = 1)
qberdev(p,dnum = 1)
rberdev(n,dnum = 1)

Arguments

dnum

number of distribution as in Berlinet/Devroye (1994), Section 3.2.

x,q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

Details

These functions implement the 28 distributions from Berlinet and Devroye (1994), Section 3.2, which are:

dnum == 1 "uniform" on [0,1] as in stats-package

dnum == 2 "exponential" as in stats-package

dnum == 3 "Maxwell"

dnum == 4 "double exponential"

dnum == 5 "logistic" as in stats-package

dnum == 6 "Cauchy" as in stats-package

dnum == 7 "extreme value"

dnum == 8 "infinite peak"

dnum == 9 "Pareto"

dnum == 10 "symmetric Pareto"

dnum == 11 "normal" as in stats-package

dnum == 12 "lognormal"

dnum == 13 "uniform scale mixture"

dnum == 14 "Matterhorn"

dnum == 15 "logarithmic peak"

dnum == 16 "isosceles triangle"

dnum == 17 "beta 2,2" as in stats-package

dnum == 18 "chi-square 1" as in stats-package

dnum == 19 "normal cubed"

dnum == 20 "inverse exponential"

dnum == 21 "Marronite"

dnum == 22 "skewed bimodal"

dnum == 23 "claw"

dnum == 24 "smooth comb"

dnum == 25 "caliper"

dnum == 26 "trimodal uniform"

dnum == 27 "sawtooth"

dnum == 28 "bilogarithmic peak"

Value

dberdev

gives the density,

pberdev

gives the distribution function,

qberdev

gives the quantile function, and

rberdev

generates random deviates.

Acknowledgement

The authors thank Luc Devroye for providing his original implementation for testing purposes.

Author(s)

Thoralf Mildenberger, Henrike Weinert and Sebastian Tiemeyer

References

A. Berlinet and L. Devroye, "A comparison of kernel density estimates," Publications de l'Institut de Statistique de l'Universite de Paris, vol. 38(3), pp. 3-59, 1994. https://hal.science/hal-03659919

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/

Examples





# histogram and true density of "Claw"-distribution
hist(rberdev(1000,dnum=23),breaks=100, main = " ",freq=FALSE)
lines(seq(-3,3,0.01),dberdev(seq(-3,3,0.01),dnum=23),col="blue",lwd=2)
title(paste(nberdev(dnum=23)))

# plot cdf of simulated data and the df of "Matterhorn"-distribution
plot.stepfun(rberdev(100,dnum=14),do.points=TRUE,main="")
lines(seq(-1,1,0.001),pberdev(seq(-1,1,0.001),dnum=14),col="blue")
title(paste(nberdev(dnum=14)))

# plot quantiles of "smooth comb"-distribution
plot(qberdev(seq(0,1,0.01),dnum=24),t="l")
title(paste(nberdev(dnum=24)))


thmild/benchden documentation built on Sept. 2, 2023, 6:59 p.m.