Plot for kernel density derivative estimate
Plot for kernel density derivative estimate for 1- to 3-dimensional data.
## S3 method for class 'kdde' plot(x, ...)
For kdde
objects, the function headers for the different dimensional data are
## univariate plot(fhat, ylab="Density derivative function", ...) ## bivariate plot(fhat, which.deriv.ind=1, cont=c(25,50,75), abs.cont, display="slice", zlab="Density derivative function", ...) ## trivariate plot(fhat, which.deriv.ind=1, display="plot3D", cont=c(25,50,75), abs.cont, colors, col, col.fun=cm.colors, ...)
Plots for 1-d and 2-d are sent to graphics window. Plot for 3-d is sent to graphics/RGL window.
In addition to the display options inherited from plot.kde
, the
first derivative has display="quiver"
. This is a quiver plot
where the size and direction of the arrow indicates the
magnitude/direction of the density gradient. See quiver2D
from
the OceanView package for more details.
## univariate example data(tempb) fhat1 <- kdde(x=tempb[,"tmin"], deriv.order=1) ## gradient [df/dx, df/dy] plot(fhat1, xlab="Min. temp.") ## df/dx points(20,predict(fhat1, x=20)) ## bivariate example fhat1 <- kdde(x=tempb[,c("tmin", "tmax")], deriv.order=1) plot(fhat1, display="quiver") ## gradient [df/dx, df/dy] fhat2 <- kdde(x=tempb[,c("tmin", "tmax")], deriv.order=2) plot(fhat2, which.deriv.ind=2, display="persp", phi=15) plot(fhat2, which.deriv.ind=2, display="filled.contour", col.fun=topo.colors) ## d^2 f/(dx dy): purple=-ve, green=zero, beige=+ve s2 <- kcurv(fhat2) plot(s2, display="filled.contour") ## summary curvature ## trivariate example data(iris) fhat1 <- kdde(iris[,2:4], deriv.order=1) plot(fhat1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.