Deconvolution kernel density derivative estimate
Deconvolution kernel density derivative estimate for 1- to 6-dimensional data.
kdcde(x, H, h, Sigma, sigma, reg, bgridsize, gridsize, binned, verbose=FALSE, ...) dckde(...)
x |
matrix of data values |
H,h |
bandwidth matrix/scalar bandwidth. If these are missing, |
Sigma,sigma |
error variance matrix |
reg |
regularisation parameter |
gridsize |
vector of number of grid points |
binned |
flag for binned estimation |
bgridsize |
vector of binning grid sizes |
verbose |
flag to print out progress information. Default is FALSE. |
... |
other parameters to |
A weighted kernel density estimate is utilised to perform the
deconvolution. The weights are obtained from from a
quadratic programming problem, and then input into kde(,w=)
.
This weighted estimate also requires an estimate of the error
variance matrix from repeated observations, and of the regularisation
parameter. If the latter is missing, it is calculated internally using
a 5-fold cross validation method. See Hazelton & Turlach (2009).
dckde
is an alias for kdcde
.
If the bandwidth H
is missing from kde
, then
the default bandwidth is the plug-in selector
Hpi
. Likewise for missing h
.
The effective support, binning, grid size, grid range, positive
parameters are the same as kde
.
A deconvolution kernel density derivative estimate is an object of class
kde
which is a list with fields:
x |
data points - same as input |
eval.points |
vector or list of points at which the estimate is evaluated |
estimate |
density estimate at |
h |
scalar bandwidth (1-d only) |
H |
bandwidth matrix |
gridtype |
"linear" |
gridded |
flag for estimation on a grid |
binned |
flag for binned estimation |
names |
variable names |
w |
vector of weights |
cont |
vector of probability contour levels |
Hazelton, M. L. & Turlach, B. A. (2009), Nonparametric density deconvolution by weighted kernel density estimators, Statistics and Computing, 19, 217-228.
data(air) air <- air[, c("date", "time", "co2", "pm10")] air2 <- reshape(air, idvar="date", timevar="time", direction="wide") air <- as.matrix(na.omit(air2[,c("co2.20:00", "pm10.20:00")])) Sigma.air <- diag(c(var(air2[,"co2.19:00"] - air2["co2.21:00"], na.rm=TRUE), var(air2[,"pm10.19:00"] - air2[,"pm10.21:00"], na.rm=TRUE))) fhat.air.dec <- kdcde(x=air, Sigma=Sigma.air, reg=0.00021, verbose=TRUE) plot(fhat.air.dec, drawlabels=FALSE, display="filled.contour", lwd=1)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.