circsizer.regression: CircSiZer map for regression

View source: R/circsizer.regression.R

circsizer.regressionR Documentation

CircSiZer map for regression

Description

This function plots the CircSiZer map for circular regression estimation based on circular kernel methods, as described in Oliveira et al. (2013). The CircSiZer is an extension of SiZer proposed by Chaudhuri and Marron (1999) to circular data.

Usage

circsizer.regression(x, y, bws=NULL, adjust=2, ngrid=150, alpha=0.05, B=500,
B2=250, log.scale=TRUE, display=TRUE)

Arguments

x

Vector of data for the independent variable. The object is coerced to class circular.

y

Vector of data for the dependent variable. This must be same length as x.

bws

Vector of smoothing parameters. Values of bws must be positive. bws will be coerced to be equally spaced. Length of vector bws must be at least 2.

adjust

If bws=NULL, the smoothing parameters used are adjust/bw and adjust*bw, where bw is the smoothing parameter obtained by using the cross–validation rule.

ngrid

Integer indicating the number of equally spaced angles between 0 and where the estimator is evaluated. Default ngrid=150.

alpha

Significance level for the CircSiZer map. Default alpha=0.05.

B

Integer indicating the number of bootstrap samples to estimate the standard deviation of the derivative estimator. Default B=500.

B2

Integer indicating the number of bootstrap samples to compute the denominator in Step 2 of algorithm described in Oliveira et al. (2013). Default B=250.

log.scale

Logical, if TRUE, the CircSiZer map is plotted in the scale -\log_{10}(\code{bws}). Default is TRUE.

display

Logical, if TRUE, the CircSiZer map is plotted. Default is TRUE.

Details

See Details Section of circsizer.density. The NAs will be automatically removed.

Value

An object with class circsizer whose underlying structure is a list containing the following components.

data

Original dataset.

ngrid

Number of equally spaced angles where the derivative of the regression estimator is evaluated.

bw

Vector of smoothing parameters (given in -\log_{10} scale if log.scale=TRUE).

log.scale

Logical; if TRUE, the -\log_{10} scale is used for constructing the CircSiZer map.

CI

List containing: a matrix with lower limits fot the confidence intervals; a matrix with the lower limits of the confidence intervals; a matrix with the Effective Sample Size. Each row corresponds to each value of the smoothing parameter and each column corresponds to an angle.

col

Matrix containing the colors for plotting the CircSiZer map.

If display==TRUE, the function also returns the CircSiZer map for regression.

Author(s)

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

References

Chaudhuri, P. and Marron, J.S. (1999). SiZer for exploration of structures in curves, Journal of the American Statistical Association, 94, 807–823.

Oliveira, M., Crujeiras, R.M. and Rodriguez–Casal (2014) CircSiZer: an exploratory tool for circular data. Environmental and Ecological Statistics, 21, 143–159.

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

circsizer.map

Examples

## Not run: 
set.seed(2012)
n <- 100
x <- seq(0,2*pi,length=n)
y <- sin(x)+sqrt(0.5)*rnorm(n)
circsizer.regression(circular(x), y, bws=seq(10,60,by=5))

## End(Not run)

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