File: parzen.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 (97 lines) | stat: -rw-r--r-- 2,963 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
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parzen.R
\name{parzen}
\alias{parzen}
\alias{Parzen}
\title{Parzen's Kernel mode estimator}
\usage{
parzen(
  x,
  bw = NULL,
  kernel = "gaussian",
  abc = FALSE,
  tolerance = .Machine$double.eps^0.25,
  ...
)
}
\arguments{
\item{x}{numeric. Vector of observations.}

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

\item{kernel}{character. The kernel to be used. For available kernels see 
\code{\link[statip]{densityfun}} in package \pkg{statip}.}

\item{abc}{logical. If \code{FALSE} (the default), the kernel density estimate 
is maximised using \code{\link[stats]{optim}}.}

\item{tolerance}{numeric. Desired accuracy in the \code{\link[stats]{optimize}} function.}

\item{...}{If \code{abc = FALSE}, further arguments to be passed to \code{\link[stats]{optim}}.}
}
\value{
\code{parzen} returns a numeric value, the mode estimate. 
If \code{abc = TRUE}, the \code{x} value maximizing the density 
estimate is returned. Otherwise, the \code{\link[stats]{optim}} 
method is used to perform maximization, and the attributes: 
'value', 'counts', 'convergence' and 'message', coming from 
the \code{\link[stats]{optim}} method, are added to the result.
}
\description{
Parzen's kernel mode estimator is the value 
maximizing the kernel density estimate.
}
\details{
If \code{kernel = "uniform"}, the \code{\link[modeest]{naive}} mode estimate is returned.
}
\note{
The user may call \code{parzen} through 
\code{mlv(x, method = "kernel", ...)} or \code{mlv(x, method = "parzen", ...)}. 

Presently, \code{parzen} 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 = "kernel", kernel = "gaussian", bw = 0.3, par = shorth(x)) 

}
\references{
\itemize{ 
\item Parzen E. (1962). 
On estimation of a probability density function and mode. 
\emph{Ann. Math. Stat.}, \bold{33}(3):1065--1076. 

\item Konakov V.D. (1973). 
On the asymptotic normality of the mode of multidimensional distributions. 
\emph{Theory Probab. Appl.}, \bold{18}:794-803. 

\item Eddy W.F. (1980). 
Optimum kernel estimators of the mode. 
\emph{Ann. Statist.}, \bold{8}(4):870-882.

\item Eddy W.F. (1982). 
The Asymptotic Distributions of Kernel Estimators of the Mode. 
\emph{Z. Wahrsch. Verw. Gebiete}, \bold{59}:279-290. 

\item Romano J.P. (1988). 
On weak convergence and optimality of kernel density estimates of the mode. 
\emph{Ann. Statist.}, \bold{16}(2):629-647. 

\item Abraham C., Biau G. and Cadre B. (2003). 
Simple Estimation of the Mode of a Multivariate Density. 
\emph{Canad. J. Statist.}, \bold{31}(1):23-34. 

\item Abraham C., Biau G. and Cadre B. (2004). 
On the Asymptotic Properties of a Simple Estimate of the Mode. 
\emph{ESAIM Probab. Stat.}, \bold{8}:1-11. 
}
}
\seealso{
\code{\link[modeest]{mlv}}, \code{\link[modeest]{naive}}
}