\HeaderA{bkfe}{Compute a Binned Kernel Functional Estimate}{bkfe}
\keyword{smooth}{bkfe}
\begin{Description}\relax
Returns an estimate of a binned approximation to
the kernel estimate of the specified density functional. 
The kernel is the standard normal density.
\end{Description}
\begin{Usage}
\begin{verbatim}
bkfe(x, drv, bandwidth, gridsize = 401, range.x, binned = FALSE,
     truncate = TRUE)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] vector of observations from the distribution whose density is to
be estimated.
Missing values are not allowed.

\item[\code{drv}] order of derivative in the density functional. Must be a
non-negative even integer.

\item[\code{bandwidth}] the kernel bandwidth smoothing parameter.

\item[\code{gridsize}] the number of equally-spaced points over which binning is
performed.

\item[\code{range.x}] vector containing the minimum and maximum values of \code{x}
at which to compute the estimate.
The default is the minimum and maximum data values, extended by the
support of the kernel.

\item[\code{binned}] logical flag: if \code{TRUE}, then \code{x} and \code{y} are taken to be grid counts
rather than raw data.

\item[\code{truncate}] logical flag: if \code{TRUE}, data with \code{x} values outside the
range specified by \code{range.x} are ignored.

\end{ldescription}
\end{Arguments}
\begin{Details}\relax
The density functional of order \code{drv} is the integral of the
product of the density and its \code{drv}th derivative. 
The kernel estimates
of such quantities are computed using a binned implementation,
and the kernel is the standard normal density.
\end{Details}
\begin{Value}
the estimated functional.
\end{Value}
\begin{Section}{Background}
Estimates of this type were proposed by Sheather and
Jones (1991).
\end{Section}
\begin{References}\relax
Sheather, S. J. and Jones, M. C. (1991).
A reliable data-based bandwidth selection method for
kernel density estimation.
\emph{Journal of the Royal Statistical Society, Series B},
\bold{53}, 683--690.

Wand, M. P. and Jones, M. C. (1995).
\emph{Kernel Smoothing.}
Chapman and Hall, London.
\end{References}
\begin{Examples}
\begin{ExampleCode}
data(geyser, package="MASS")
x <- geyser$duration
est <- bkfe(x, drv=4, bandwidth=0.3)
\end{ExampleCode}
\end{Examples}

