The modal interval, i.e. the shortest interval among intervals containing
k+1
observations, is first computed. (In dimension > 1, this question
is known as a 'k-enclosing problem'.)
The user should either give the bandwidth bw
or the argument k
,
k
being taken equal to ceiling(bw*n) - 1
if missing, so
bw
can be seen as the fraction of the observations to be considered
for the shortest interval.
If type = 1
, the midpoint of the modal interval is returned.
If type = 2
, the floor((k+1)/2)
th element of the modal
interval is returned.
If type = 3
or type = "dalenius"
, the median of the modal
interval is returned.
If type = 4
or type = "shorth"
, the mean of the modal interval
is returned.
If type = 5
or type = "ekblom"
, Ekblom's
\(L_{-\infty}\) estimate is returned, see Ekblom (1972).
If type = 6
or type = "hsm"
, the half sample mode (hsm) is
computed, see hsm
.