Description Usage Arguments Details Value Author(s) References See Also Examples
Densitybased distance between onedimensional data and a unimodal symmetric distribution about the data mean based on Pons (2013, p.79), adapted by Hennig and Coretto (2021), see details.
1 2 
x 
vector. Onedimensional dataset. 
weights 
nonnegative vector. Relative weights of observations (will be standardised to sup up to one internally). 
maxq 
densities are evaluated between 
kernn 
integer. Number of points at which the density is
evaluated, input parameter 
Function density
is used in order to compute a kernel
density estimator from the data. The kernn
values of the
density are then ordered from the pargest to the smallest. Beginning
from the largest to the smallest, pairs of two values are formed
(largest and largest biggest, third and fourth largest, and so
on). Each pair is replaced by two copies of the average of the two
values. Then on each side of the mean one of each copy is placed from
the biggest to the smallest, and this produces a symmetric density
about the mean. The the root mean squared difference between this and
the original density is computed.
A list with components cp, cpx, measure
.
cp 
vector of generated symmetric density values from largest to
smallest (just one copy, sp 
cpx 

measure 
root mean squared difference between the densities. 
Christian Hennig christian.hennig@unibo.it https://www.unibo.it/sitoweb/christian.hennig/en/
Hennig, C. and P.Coretto (2021). An adequacy approach for deciding the number of clusters for OTRIMLE robust Gaussian mixture based clustering. To appear in Australian and New Zealand Journal of Statistics, https://arxiv.org/abs/2009.00921.
Pons, O. (2013). Statistical Tests of Nonparametric Hypotheses: Asymptotic Theory. World Scientific, Singapore.
1 2 3  set.seed(124578)
x < runif(20)
str(kerndensmeasure(x))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.