Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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, h=0)

Arguments

x

Numeric data vector.

h

The bandwidth. If x is constructed with lp(), the bandwidth should be given there instead.

Value

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

See Also

Examples

data(geyser, package="locfit")
lscv.exact(lp(geyser,h=0.25))
# equivalent form using lscv
lscv(lp(geyser, h=0.25), exact=TRUE)

locfit

Local Regression, Likelihood and Density Estimation

v1.5-9.4
GPL (>= 2)
Authors
Catherine Loader [aut], Jiayang Sun [ctb], Lucent Technologies [cph], Andy Liaw [cre]
Initial release
2020-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.