bw.reg.circ.lin: Cross-validation rule for circular regression estimation

View source: R/bw.reg.circ.lin.R

bw.reg.circ.linR Documentation

Cross-validation rule for circular regression estimation

Description

Function bw.reg.circ.lin provides the least squares cross-validation smoothing parameter for the Nadaraya-Watson and Local-Linear estimators when the covariate is circular and the response variable is linear.

Function bw.reg.circ.circ provides the least squares cross-validation smoothing parameter for the Nadaraya-Watson and Local-Linear estimators when the covariate and the response variable are circular.

Function bw.reg.lin.circ provides the least squares cross-validation smoothing parameter for the Nadaraya-Watson and Local-Linear estimators when the covariate is linear and the response variable is circular.

Usage

bw.reg.circ.lin(x, y, method="LL", lower=0, upper=50, tol=1e-2)
bw.reg.circ.circ(x, y, method="LL", option=1, lower=0, upper=50, tol=1e-2)
bw.reg.lin.circ(x, y, method="LL", option=1, lower=0, upper=50, tol=1e-2)

Arguments

x

Vector of data for the independent variable. The object is coerced to class circular when using functions bw.reg.circ.lin and bw.reg.circ.circ.

y

Vector of data for the dependent variable. This must be same length as x. The object is coerced to class circular when using functions bw.reg.circ.circ and bw.reg.lin.circ.

method

Character string giving the estimator to be used. This must be one of "LL" or "NW". Default method="LL".

option

Cross–validation rule. Default option=1. See details.

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.

Details

For nonparmetric regression with circular response, given (X_i,Y_i), i=1,…,n: If option=1, the cross–validation smoothing parameter is computed as the value that minimizes ∑_{i=1}^{n}(-\cos(Y_i-\hat{f}^{-i}(X_i)), where \hat{f}^{-i} denotes the estimator computed with all the observations except (X_i,Y_i).

If option=2, the cross–validation smoothing parameter is computed as the value that minimizes n^{-1}∑_{i=1}^{n}(d(Y_i,\hat{f}^{-i}(X_i))^2 where d(Y_i,\hat{f}^{-i}(X_i)=\min(|Y_i-\hat{f}^{-i}(X_i)|,2π-|Y_i-\hat{f}^{-i}(X_i)|).

The NAs will be automatically removed.

Value

Value of the smoothing parameter.

Author(s)

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

References

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

Di Marzio, M., Panzera A. and Taylor, C. C. (2012) Non–parametric regression for circular responses. Scandinavian Journal of Statistics, 40, 228–255.

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.reg.circ.lin, kern.reg.circ.circ, kern.reg.lin.circ

Examples

set.seed(2012)
n <- 100
x <- seq(0,2*pi,length=n)
y <- sin(x)+0.2*rnorm(n)
bw.reg.circ.lin(circular(x), y, method="LL", lower=1, upper=20)
bw.reg.circ.lin(circular(x), y, method="NW", lower=1, upper=20)

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