File: vieu.Rd

package info (click to toggle)
r-cran-modeest 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 280 kB
  • sloc: makefile: 2
file content (61 lines) | stat: -rw-r--r-- 1,800 bytes parent folder | download
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vieu.R
\name{vieu}
\alias{vieu}
\alias{Vieu}
\title{Vieu's mode estimator}
\usage{
vieu(x, bw = NULL, kernel = "gaussian", abc = FALSE, ...)
}
\arguments{
\item{x}{numeric. Vector of observations.}

\item{bw}{numeric. The smoothing bandwidth to be used.}

\item{kernel}{character. The kernel to be used. Available kernels are \code{"biweight"}, 
\code{"cosine"}, \code{"eddy"}, \code{"epanechnikov"}, \code{"gaussian"}, 
\code{"optcosine"}, \code{"rectangular"}, \code{"triangular"}, 
\code{"uniform"}. See \code{\link[stats]{density}} for more details on some 
of these kernels.}

\item{abc}{logical. If \code{FALSE} (the default), the root of the density derivate 
estimate is searched with \code{\link[stats]{uniroot}}.}

\item{...}{If \code{abc = FALSE}, further arguments to be passed to 
\code{\link[stats]{uniroot}}.}
}
\value{
\code{vieu} returns a numeric value, the mode estimate. If \code{abc = TRUE}, 
the \code{x} value at which the density derivative estimate is null is 
returned. Otherwise, the \code{\link[stats]{uniroot}} method is used.
}
\description{
Vieu's mode estimator is the value at which the kernel density derivative 
estimate is null.
}
\note{
The user may call \code{vieu} through 
\code{mlv(x, method = "vieu", ...)}. 

Presently, \code{vieu} is quite slow.
}
\examples{
# Unimodal distribution
x <- rlnorm(10000, meanlog = 3.4, sdlog = 0.2)

## True mode
lnormMode(meanlog = 3.4, sdlog = 0.2)

## Estimate of the mode
mlv(x, method = "vieu", kernel = "gaussian")

}
\references{
\itemize{ 
  \item Vieu P. (1996). A note on density mode estimation. 
  \emph{Statistics \& Probability Letters}, \bold{26}:297--307.
}
}
\seealso{
\code{\link[modeest]{mlv}}, \code{\link[modeest]{parzen}}.
}