set.seed(2022)
n <- 50
x <- rcircmix(n, model=13)
# Using the smoothing parameter by default,
# i.e., 2-stage solve-the-equation plug-in rule
est1 <- kern.den.circ(x,deriv.order=1)
# Selecting the smoothing parameter: 2-stage direct plug-in rule
est2 <- kern.den.circ(x, bw="dpi", deriv.order=1)
# Circular plot
plot(est1, plot.type="circle", points.plot=TRUE, shrink=1.4,
main="Circular plot",ylab="Density derivative circular")
lines(est2, plot.type="circle", shrink=1.4 ,col=2)
# Linear plot
plot(est1, plot.type="line", main="Linear plot",ylab="Density derivative circular")
lines(est2, plot.type="line", col=2)
Run the code above in your browser using DataLab