Evaluate the modal regions for a data set. Only the version for circular data is implemented.
modal.region(x, ...)
# S3 method for default
modal.region(x, ...)
# S3 method for circular
modal.region(x, z=NULL, q=0.95, bw, adjust = 1,
type = c("K", "L"), kernel = c("vonmises", "wrappednormal"),
na.rm = FALSE, step=0.01, eps.lower=10^(-4), eps.upper=10^(-4), ...)
A list of class modal.region.circular
with the following elements
extremes of modal regions, possible as a matrix
a list with two components: tot
with the total
(area under the density) probability, which should approximately equal
to q
and areas
with the probability of each modal region.
the object from function density.circular
.
the modal region order as in input.
the cut point at the density scale.
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 next methods.
Claudio Agostinelli
Only the version for circular data is actually implemented.
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.
totalvariation.circular
x <- rvonmises(100, circular(pi), 10)
res <- modal.region(x, bw=50)
plot(res)
Run the code above in your browser using DataLab