bw.CV: Cross-validation for density estimation

View source: R/bw.CV.R

bw.CVR Documentation

Cross-validation for density estimation

Description

This function provides a least squares cross-validation smoothing parameter or a likelihood cross-validation smoothing parameter for density estimation.

Usage

bw.CV(x, method="LCV", lower=0, upper=50, tol=1e-2, np=500)

Arguments

x

Data from which the smoothing parameter is to be computed. The object is coerced to class circular.

method

Character string giving the cross-validation rule to be used. This must be one of "LCV" or "LSCV". Default method="LCV".

lower, upper

lower and upper boundary of the interval to be used in the search for the value of the smoothing parameter. Default lower=0 and upper=50.

tol

Convergence tolerance for optimize. Default tol=1e-2.

np

Number of points where to evaluate the estimator for numerical integration when method="LSCV". Default np=500.

Details

The LCV smoothing parameter is obtained as the value of ν that maximizes the logarithm of the likelihood cross-validation function (8) in Oliveira et al. (2013). The LSCV smoothing parameter is obtained as the value of ν that minimizes expression (7) in Oliveira et al. (2013). See also Hall et al. (1987) and Oliveira et al. (2012). The NAs will be automatically removed.

Value

Value of the smoothing parameter.

Author(s)

Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez–Casal

References

Hall, P., Watson, G.S. and Cabrera, J. (1987) Kernel density estimation with spherical data, Biometrika, 74, 751–762.

Oliveira, M., Crujeiras, R.M. and Rodriguez–Casal, A. (2012) A plug–in rule for bandwidth selection in circular density. Computational Statistics and Data Analysis, 56, 3898–3908.

Oliveira, M., Crujeiras R.M. and Rodriguez–Casal, A. (2013) Nonparametric circular methods for exploring environmental data. Environmental and Ecological Statistics, 20, 1–17.

Oliveira, M., Crujeiras R.M. and Rodriguez–Casal, A. (2014) NPCirc: an R package for nonparametric circular methods. Journal of Statistical Software, 61(9), 1–26. https://www.jstatsoft.org/v61/i09/

See Also

kern.den.circ, bw.rt, bw.pi, bw.boot

Examples

set.seed(2012)
n <- 100
x <- rcircmix(n, model=11)
bw.CV(x, method="LCV", lower=0, upper=20)
bw.CV(x, method="LSCV", lower=0, upper=20)

NPCirc documentation built on Nov. 10, 2022, 5:48 p.m.