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.
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)Value of the smoothing parameter.
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.
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.
Character string giving the estimator to be used. This must be one of "LL" or "NW". Default method="LL".
Cross--validation rule. Default option=1. See details.
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.
Convergence tolerance for optimize. Default tol=1e-2.
Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez--Casal
For nonparmetric regression with circular response, given \((X_i,Y_i)\), \(i=1,\ldots,n\):
If option=1, the cross--validation smoothing parameter is computed as the value that minimizes \(\sum_{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}\sum_{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\pi-|Y_i-\hat{f}^{-i}(X_i)|)\).
The NAs will be automatically removed.
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/
kern.reg.circ.lin, kern.reg.circ.circ, kern.reg.lin.circ
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)
Run the code above in your browser using DataLab