## univariate
data(earthquake)
eq3 <- -log10(-earthquake[,3])
fhat <- drvkde(x=eq3, drv=0, bandwidth=0.1) ## KDE of f
fhat1 <- drvkde(x=eq3, drv=1, bandwidth=0.1) ## KDE of df/dx
## trivariate
data(earthquake)
earthquake[,3] <- -log10(-earthquake[,3])
fhat <- drvkde(x=earthquake, drv=c(0,0,0), bandwidth=c(0.04,0.04,0.05),
se=FALSE) ## KDE of f
fhat212 <- drvkde(x=earthquake, drv=c(2,1,2), bandwidth=c(0.04,0.04,0.05),
se=FALSE) ## KDE of d^3 f/ dx^2 dy dz^2Run the code above in your browser using DataLab