Plot for kernel density derivative estimate

Share:

Description

Plot for kernel density derivative estimate for 1- to 3-dimensional data.

Usage

1
2
## S3 method for class 'kdde'
plot(x, ...)

Arguments

x

an object of class kdde (output from kdde)

...

other graphics parameters:

which.deriv.ind

index of the partial derivative to be plotted (>1-d)

and those used in plot.kde

Details

For kdde objects, the function headers for the different dimensional data are

1
2
3
4
5
6
7
  ## 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", ...)
  

Value

Plots for 1-d and 2-d are sent to graphics window. Plot for 3-d is sent to RGL window.

See Also

plot.kde

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## univariate example
data(unicef)
fhat1 <- kdde(x=unicef[,1], deriv.order=1)  ## gradient [df/dx, df/dy]
plot(fhat1, xlab="Under-5")                 ## df/dx
points(30,predict(fhat1, x=30))

## bivariate example
fhat2 <- kdde(x=unicef, deriv.order=2)
plot(fhat2, which.deriv.ind=2, display="persp", phi=20)
plot(fhat2, which.deriv.ind=2, display="filled.contour2", col.fun=topo.colors)
  ## d^2 f/(dx dy): purple=-ve, green=zero, beige=+ve

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.