kern.den.circ {NPCirc} | R Documentation |
This function computes circular kernel density estimates with the given bandwidth, taking the von Mises distribution as circular kernel.
kern.den.circ(x, t=NULL, bw=NULL, from=circular(0), to=circular(2*pi), len=250)
x |
Data from which the estimate is to be computed. The object is coerced to class |
t |
Points where the density is estimated. If |
bw |
Smoothing parameter to be used. The value of the smoothing parameter can be chosen by using the functions |
from, to |
Left and right-most points of the grid at which the density is to be estimated. The objects are coerced to class |
len |
Number of equally spaced points at which the density is to be estimated. |
The NAs will be automatically removed.
An object with class density.circular
whose underlying structure is a list containing the following components:
data |
Original dataset. |
x |
The points where the density is estimated. |
y |
The estimated density values. |
bw |
The smoothing parameter used. |
N |
The sample size after elimination of missing values. |
call |
The call which produced the result. |
data.name |
The deparsed name of the x argument. |
has.na |
Logical, for compatibility (always FALSE). |
Mar?a Oliveira, Rosa M. Crujeiras and Alberto Rodr?guez–Casal
Oliveira, M., Crujeiras, R.M. and Rodr?guez–Casal, A. (2012) A plug–in rule for bandwidth selection in circular density. Computational Statistics and Data Analysis, 56, 3898–3908.
Taylor, C.C. (2008) Automatic bandwidth selection for circular density estimation. Computational Statistics and Data Analysis, 52, 3493–3500.
Oliveira, M., Crujeiras R.M. and Rodr?guez–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/
bw.rt
, bw.CV
, bw.pi
, bw.boot
, plot.density.circular
, lines.density.circular
set.seed(2012)
n <- 100
x <- rcircmix(n, model=14)
est1 <- kern.den.circ(x, t=NULL, bw=NULL)
plot(est1, plot.type="circle", points.plot=TRUE, shrink=1.2, main="Circular plot")
est2 <- kern.den.circ(x, t=NULL, bw=20)
lines(est2, plot.type="circle",shrink=1.2,col=2)
plot(est1, plot.type="line", main="Linear plot")
lines(est2, plot.type="line", col=2)