The total variation distance between two circular samples is evaluated conditional on a circular modal region.
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), ...)
numeric or an object of class circular
.
numeric or an object of class circular
.
numeric or object of class circular
. The grid
were the kernel density estimate will be evaluated. If NULL
equally spaced points in the interval [0,2*pi) with step step
.
numeric in the interval [0,1]. The quantile of the modal region.
the smoothing bandwidth to be used. When the kernel
is vonmises
the bandwidth is equal to the concentration
parameter.
the bandwidth used is actually adjust*bw
. This
makes it easy to specify values like ``half the default bandwidth''.
Not Yet Used.
a character string giving the smoothing kernel to be
used. This must be one of "vonmises"
or
"wrappednormal"
, that are kernels of type
"K"
.
logical; if TRUE
, missing values are removed from
x
. If FALSE
any missing values cause an error.
numeric. Used in the construction of the regular grid z
.
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
modal.region.circular
function. Not used at present.
A list of class totalvariation.circular
with the following
components
the (conditional) total variation.
the (conditional) overlapping coefficient.
the order of the modal regions.
the bandwidth value as in input.
an obejct of class modal.region.circular
for the x
data set.
an obejct of class modal.region.circular
for the y
data set.
an obejct of class density.circular
for the x
data set.
an obejct of class density.circular
for the y
data set.
a function which report the positive part of the difference between the estimated density of the two data sets.
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.
# NOT RUN {
x <- rvonmises(100, circular(pi), 10)
y <- rvonmises(100, circular(pi+pi/8), 10)
res <- totalvariation.circular(x,y,bw=50)
plot(res)
# }
Run the code above in your browser using DataLab