1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/venter.R
\name{venter}
\alias{venter}
\alias{Venter}
\alias{shorth}
\title{The Venter / Dalenius / LMS mode estimator}
\usage{
venter(
x,
bw = NULL,
k,
iter = 1,
type = 1,
tie.action = "mean",
tie.limit = 0.05,
warn = FALSE
)
shorth(x, ...)
}
\arguments{
\item{x}{numeric. Vector of observations.}
\item{bw}{numeric. The bandwidth to be used. Should belong to (0, 1]. See 'Details'.}
\item{k}{numeric. See 'Details'.}
\item{iter}{numeric. Number of iterations.}
\item{type}{numeric or character. The type of Venter estimate to be computed. See 'Details'.}
\item{tie.action}{character. The action to take if a tie is encountered.}
\item{tie.limit}{numeric. A limit deciding whether or not a warning is given when a tie is
encountered.}
\item{warn}{logical. If \code{TRUE}, a warning is thrown when a tie is encountered.}
\item{...}{Further arguments.}
}
\value{
A numeric value is returned, the mode estimate.
}
\description{
This function computes the Venter mode estimator, also called the Dalenius,
or LMS (Least Median Square) mode estimator.
}
\details{
The modal interval, i.e. the shortest interval among intervals containing
\code{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 \code{bw} or the argument \code{k},
\code{k} being taken equal to \code{ceiling(bw*n) - 1} if missing, so
\code{bw} can be seen as the fraction of the observations to be considered
for the shortest interval.
If \code{type = 1}, the midpoint of the modal interval is returned.
If \code{type = 2}, the \code{floor((k+1)/2)}th element of the modal
interval is returned.
If \code{type = 3} or \code{type = "dalenius"}, the median of the modal
interval is returned.
If \code{type = 4} or \code{type = "shorth"}, the mean of the modal interval
is returned.
If \code{type = 5} or \code{type = "ekblom"}, Ekblom's
\eqn{L_{-\infty}}{L_{-infinity}} estimate is returned, see Ekblom (1972).
If \code{type = 6} or \code{type = "hsm"}, the half sample mode (hsm) is
computed, see \code{\link{hsm}}.
}
\note{
The user may call \code{venter} through
\code{mlv(x, method = "venter", ...)}.
}
\examples{
library(evd)
# Unimodal distribution
x <- rgev(1000, loc = 23, scale = 1.5, shape = 0)
## True mode
gevMode(loc = 23, scale = 1.5, shape = 0)
## Estimate of the mode
venter(x, bw = 1/3)
mlv(x, method = "venter", bw = 1/3)
}
\references{
\itemize{
\item Dalenius T. (1965).
The Mode - A Negleted Statistical Parameter.
\emph{J. Royal Statist. Soc. A}, \emph{128}:110-117.
\item Venter J.H. (1967).
On estimation of the mode.
\emph{Ann. Math. Statist.}, \bold{38}(5):1446-1455.
\item Ekblom H. (1972).
A Monte Carlo investigation of mode estimators in small samples.
\emph{Applied Statistics}, \bold{21}:177-184.
\item Leclerc J. (1997).
Comportement limite fort de deux estimateurs du mode : le shorth et l'estimateur naif.
\emph{C. R. Acad. Sci. Paris, Serie I}, \bold{325}(11):1207-1210.
}
}
\seealso{
\code{\link[modeest]{mlv}} for general mode estimation,
\code{\link[modeest]{hsm}} for the half sample mode.
}
|