Last chance! 50% off unlimited learning
Sale ends in
kdde(x, H, h, deriv.order=0, gridsize, gridtype, xmin, xmax, supp=3.7,
eval.points, binned=FALSE, bgridsize, positive=FALSE,
adj.positive, w, deriv.vec=TRUE)
-supp, supp
]positive=TRUE
KDE is carried out on log(x +
adj.positive)
. Default is the minimum of x
.kdde
:eval.points
eval.points
is not specified, then the
density derivative estimate is computed over a grid
defined by gridsize
(if binned=FALSE
) or
by bgridsize
(if binned=TRUE
). For d = 1, 2, 3, 4,
and if eval.points
is specified, then the
density derivative estimate is computed exactly at eval.points
.
For d > 4, the kernel density derivative estimate is computed exactly
and eval.points
must be specified.
The default xmin
is min(x) - Hmax*supp
and xmax
is max(x) + Hmax*supp
where Hmax
is the maximum of the
diagonal elements of H
.The default weights w
is a vector of all ones.
For each partial derivative, for grid estimation, the estimate is a list whose elements
correspond to the partial derivative indices in the rows of deriv.ind
.
For points estimation, the estimate is a matrix whose columns correspond to
rows of deriv.ind
.
kde
## univariate example
x <- rnorm.mixt(n=100, mus=1, sigmas=1, props=1)
fhat2 <- kdde(x=x, h=hpi(x), deriv.order=2) ## d^2 f/dx^2
## bivariate example
data(unicef)
H.scv <- Hscv(x=unicef)
fhat1 <- kdde(x=unicef, H=H.scv, deriv.order=1) ## gradient vector
Run the code above in your browser using DataLab