View source: R/ancova.circ.lin.R
ancova.circ.lin | R Documentation |
Function ancova.circ.lin
computes nonparametric ANCOVA tests to compare regression curves with a circular predictor variable and a real-valued response variable. The null hypothesis may be either equality or parallelism of the regression curves, 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 ancova.lin.circ
computes nonparametric ANCOVA tests to compare regression curves with a real-valued predictor variable and a circular response variable. The null hypothesis may be either equality or parallelism of the regression curves, 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 ancova.circ.circ
computes nonparametric ANCOVA tests to compare regression curves with a circular predictor variable and a circular response variable. The null hypothesis may be either equality or parallelism of the regression curves, 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).
ancova.circ.lin(x, y, g, bw, bw1, test = "eq", method = "LL",calib = "chisq", n_boot = 500) ancova.lin.circ(x, y, g, bw, bw1, test = "eq", method = "LL", n_boot = 500) ancova.circ.circ(x, y, g, bw, bw1, test = "eq", method = "LL", n_boot = 500)
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 |
g |
Vector of group indicators. |
bw |
Smoothing parameter to be used. If not provided it selects the parameter obtained by cross-validation. |
bw1 |
Preliminary smoothing parameter for the parallelism test. |
test |
Character string giving the type of test to be performed. Must be one of |
method |
Character string giving the estimator to be used. This must be one of |
calib |
Character string giving the calibration method to be used in |
n_boot |
Number of bootstrap resamples. Default is |
See Alonso-Pena et al. (2021). The NAs will be automatically removed.
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. |
Maria Alonso-Pena, Jose Ameijeiras-Alonso and Rosa M. Crujeiras
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.
kern.reg.circ.lin
, kern.reg.lin.circ
, kern.reg.circ.circ
# ANCOVA circ-lin set.seed(2025) x1 <- rcircularuniform(100) x2 <- rcircularuniform(100) x <- c(x1, x2) y1 <- 2*sin(as.numeric(x1)) + rnorm(100, sd=2) y2 <- 4 + 2*sin(as.numeric(x2)) + rnorm(100, sd=2) y <- c(y1, y2) g <- c(rep(0,100), rep(1,100)) ancova.circ.lin(x, y, g, test = "eq") ancova.circ.lin(x, y, g, test = "paral") # ANCOVA lin-circ set.seed(2025) x1 <- runif(100) x2 <- runif(100) y1 <- 3*pi*x1^2 + rvonmises(100, mu = 0, kappa = 6) y2 <- 2*pi/8 + 3*pi*x2^2 + rvonmises(100, mu = 0, kappa = 6) x <- c(x1, x2) y <- c(y1, y2) g<-c(rep(0, 100), rep(1, 100)) ancova.lin.circ(x, y, g, test = "eq") ancova.lin.circ(x, y, g, test = "paral") # ANCOVA circ-circ set.seed(2025) x1 <- rcircularuniform(100) x2 <- rcircularuniform(100) y1 <- 2*sin(2*x1) + rvonmises(100, mu = 0, kappa = 8 ) y2 <- pi/8 + 2*sin(2*x2) + rvonmises(100, mu = 0, kappa = 8 ) x <- c(x1, x2) y <- c(y1, y2) g<-c(rep(0, 100), rep(1, 100)) ancova.circ.circ(x, y, g, test = "eq") ancova.circ.circ(x, y, g, test = "paral")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.