noeffect.circ.lin {NPCirc}R Documentation

No-effect test for regression with circular data

Description

Function noeffect.circ.lin computes the no-effect test for a circular predictor variable and a real-valued response variable as described in Alonso-Pena et al. (2021). It uses the nonparametric Nadaraya-Watson estimator or the Local-Linear estimator for circular-linear data described in Di Marzio et al. (2009) and Oliveira et al. (2013).

Function noeffect.lin.circ computes the no-effect test for a real-valued predictor variable and a circular response variable as described in Alonso-Pena et al. (2021). It uses the nonparametric Nadaraya-Watson estimator or the Local-Linear estimator for linear-circular data described in Di Marzio et al. (2012).

Function noeffect.circ.circ computes the no-effect test for a circular predictor variable and a circular response variable as described in Alonso-Pena et al. (2021). It uses the nonparametric Nadaraya-Watson estimator or the Local-Linear estimator for circular-circular data described in Di Marzio et al. (2012).

Usage

noeffect.circ.lin(x, y, bw, method = "LL", calib = "chisq", n_boot = 500)
noeffect.lin.circ(x, y, bw, method = "LL", n_boot = 500)
noeffect.circ.circ(x, y, bw, method = "LL", n_boot = 500)

Arguments

x

Vector of data for the independent variable. The object is coerced to class circular when using functions noeffect.circ.lin and noeffect.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 noeffect.lin.circ and noeffect.circ.circ.

bw

Smoothing parameter to be used. If not provided, functions noeffect.circ.lin and noeffect.circ.circ select 4cv and function noeffect.lin.circ selects cv/4, where cv is the parameter selected by cross-validation.

method

Character string giving the estimator to be used. This must be one of "LL" for Local-Linear estimator or "NW" for Nadaraya-Watson estimator. Default method="LL".

calib

Character string giving the calibration method to be used in noeffect.circ.lin function. This must be one of "chisq" for the chi-squared approximation or "boot" for the bootstrap calibration.

n_boot

Number of bootstrap resamples. Default is n_boot=500. In function noeffect.circ.lin, only if calib="boot".

Details

See Alonso-Pena et al. (2021). The NAs will be automatically removed.

Value

A list with class "htest" containing the following components:

statistic

observed value of the statistic.

bw

Smoothing parameter used.

p.value

p-value for the test.

data.name

a character string giving the name(s) of the data.

alternative

a character string describing the alternative hypothesis.

Author(s)

Maria Alonso-Pena, Jose Ameijeiras-Alonso and Rosa M. Crujeiras

References

Alonso-Pena, M., Ameijeiras-Alonso, J. and Crujeiras, R.M. (2021) Nonparametric tests for circular regression. Journal of Statistical Computation and Simulation, 91(3), 477–500.

Di Marzio, M., Panzera A. and Taylor, C. C. (2009) Local polynomial regression for circular predictors. Statistics and Probability Letters, 79, 2066–2075.

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. (2013) Nonparametric circular methods for exploring environmental data. Environmental and Ecological Statistics, 20, 1–17.

See Also

kern.reg.circ.lin, kern.reg.lin.circ, kern.reg.circ.circ

Examples


# No-effect circ-lin
set.seed(2025)
x <- rcircularuniform(200)
y <- 2*sin(as.numeric(x)) + rnorm(200, sd=2)
noeffect.circ.lin(x, y)

# No-effect lin-circ
set.seed(2025)
x <- runif(200)
y<- pi/8 + rvonmises(200, mu = 0, kappa = 0.75)
noeffect.lin.circ(x, y)


# No-effect circ-circ
set.seed(2025)
x <- rcircularuniform(200)
y <- atan2(sin(2*x),cos(2*x)) + rvonmises(200, mu = 0, kappa = 2)
noeffect.circ.circ(x, y)


[Package NPCirc version 3.1.1 Index]