Learn R Programming

locfit (version 1.1-11)

lscv.exact: Exact LSCV Calculation

Description

This function performs the exact computation of the least squares cross validation statistic for one-dimensional kernel density estimation and a constant bandwidth.

At the time of writing, it is implemented only for the Gaussian kernel (with the standard deviation of 0.4; Locfit's standard).

Usage

lscv.exact(x, alpha, ...)

Arguments

x
Numeric data vector
alpha
The bandwidth. Note that this function only works with a constant bandwidth, and in accordance with Locfit's standard, this can be specified as alpha=c(0,h). It can also be given as a single number, which will be interpreted as a
...
not used.

Value

  • A vector of the LSCV statistic and the fitted degrees of freedom.

See Also

lscv, lscvplot

Examples

Run this code
data(geyser, package="locfit")
lscv.exact(geyser,alpha=0.25)
# equivalent form using lscv
lscv(geyser,alpha=0.25,exact=TRUE)

Run the code above in your browser using DataLab