View source: R/bw.reg.circ.lin.R
bw.reg.circ.lin | R Documentation |
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)
x |
Vector of data for the independent variable. The object is coerced to class |
y |
Vector of data for the dependent variable. This must be same length as |
method |
Character string giving the estimator to be used. This must be one of |
option |
Cross–validation rule. Default |
lower, upper |
|
tol |
Convergence tolerance for |
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 of the smoothing parameter.
Maria Oliveira, Rosa M. Crujeiras and Alberto Rodriguez–Casal
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.