totalvariation.circular {circular} | R Documentation |
Conditional total variation distance between two circular samples.
Description
The total variation distance between two circular samples is evaluated conditional on a circular modal region.
Usage
totalvariation.circular(x, y, z = NULL, q = 0.95, bw, adjust = 1,
type = c("K", "L"), kernel = c("vonmises", "wrappednormal"),
na.rm = FALSE, step = 0.001, eps.lower = 10^(-4), eps.upper = 10^(-4), ...)
Arguments
x |
numeric or an object of class |
y |
numeric or an object of class |
z |
numeric or object of class |
q |
numeric in the interval [0,1]. The quantile of the modal region. |
bw |
the smoothing bandwidth to be used. When the |
adjust |
the bandwidth used is actually |
type |
Not Yet Used. |
kernel |
a character string giving the smoothing kernel to be
used. This must be one of |
na.rm |
logical; if |
step |
numeric. Used in the construction of the regular grid |
eps.lower , eps.upper |
the cut point in the density is searched in the interval [min(density)*(1+eps.lower),max(density)*(1-eps.upper)]. |
... |
further arguments passed to the
|
Value
A list of class totalvariation.circular
with the following
components
tv |
the (conditional) total variation. |
ovl |
the (conditional) overlapping coefficient. |
q |
the order of the modal regions. |
bw |
the bandwidth value as in input. |
modal.x |
an object of class |
modal.y |
an object of class |
density.x |
an object of class |
density.y |
an object of class |
density |
a function which report the positive part of the difference between the estimated density of the two data sets. |
Author(s)
Claudio Agostinelli
References
L.G.R. Oliveira-Santos, C.A. Zucco and C. Agostinelli (2013) Using conditional circular kernel density functions to test hypotheses on animal circadian activity. Animal Behaviour, 85(1) 269-280.
See Also
Examples
x <- rvonmises(100, circular(pi), 10)
y <- rvonmises(100, circular(pi+pi/8), 10)
res <- totalvariation.circular(x,y,bw=50)
plot(res)