Creates a distributional object using a kernel density estimate with a
Gaussian kernel obtained from the kde() function. The bandwidth
can be specified; otherwise the kde_bandwidth() function is used.
The cdf, quantiles and moments are consistent with the kde. Generating
random values from the kde is equivalent to a smoothed bootstrap.
Usage
dist_kde(
y,
h = NULL,
H = NULL,
method = c("normal", "robust", "plugin", "lookout"),
...
)Arguments
- y
Numerical vector or matrix of data, or a list of such objects. If a list is provided, then all objects should be of the same dimension. e.g., all vectors, or all matrices with the same number of columns.
- h
Bandwidth for univariate distribution. Ignored if
yhas 2 or more columns. IfNULL, thekde_bandwidthfunction is used.- H
Bandwidth matrix for multivariate distribution. If
NULL, thekde_bandwidthfunction is used.- method
The method of bandwidth estimation to use. See
kde_bandwidth()for details. Ignored ifhorHare specified.- ...
Other arguments are passed to
kde.