density.circular
computes kernel density estimates
with the given kernel and bandwidth for circular data.## S3 method for class 'circular':
density(x, z=NULL, bw, adjust = 1, type = c("K", "L"),
kernel = c("vonmises", "wrappednormal"), na.rm = FALSE, from = circular(0),
to = circular(2 * pi), n = 512, K = NULL, min.k=10, control.circular=list(), ...)
## S3 method for class 'density.circular':
print(x, digits = NULL, \dots)
circular
.NULL
equally spaced points are used according to the parameters
from
, to
and n
.kernel
is vonmises
the bandwidth is equal to the concentration
parameter.adjust*bw
. This
makes it easy to specify values like ``half the default bandwidth''."vonmises"
or
"wrappednormal"
, that are kernels of type
"K"
.TRUE
, missing values are removed from
x
. If FALSE
any missing values cause an error.circular
.x
component)."density.circular"
whose
underlying structure is a list containing the following components.n
coordinates of the points where the density is
estimated. It is a circular objects with coordinate system setting using control.circular
.x
argument.J. Klemel"a (2000). Estimation of densities and derivatives of densities with directioinal data, Journal of Multivariate Analysis, 73, 18-40.
V.R. Prayag and A.P. Gore (1990). Density Estimation for Randomly Distributed Circular Objects, Metrika, 1990, 37, 63-69.
P. Hall and G.S. Watson and J. Cabrera (1987). Kernel Density Estimation with Spherical Data, Biometrika, 74, 4, 751--762.
plot.density.circular
and lines.density.circular
x <- rvonmises(n=100, mu=circular(pi), kappa=2)
res25 <- density(x, bw=25, control.circular=list(units="degrees"))
circularp(res25$x)
plot(res25, points.plot=TRUE, xlim=c(-1.6,1))
res50 <- density(x, bw=25, adjust=2)
lines(res50, col=2)
Run the code above in your browser using DataLab