Univariate and multivariate kernel density estimation | R Documentation |
Univariate and multivariate kernel density estimation.
kernel(x, h = "silverman", parallel = FALSE, cores = 0)
x |
A numerical vector or a matrix with the data. |
h |
The bandwidth, it can be a value, a vector of values or NULL, in which case Silverman's rule is applied. |
parallel |
A boolean value for parallel version. |
cores |
In case you set parallel = TRUE, then you need to specify the number of cores. |
The function computes the kernel density estimate, using a Gaussian kernel, for a vector or a matrix. The user provides the bandwidth, other Silverman's rule is applied. For the case of multivariate data the data are standardized (variable-wise) first and the same bandwith is used.
If h is a single number, then this is a vector with the estimated values. If h is a vector of values this is a matrix where each column corresponds to a value of h.
Michail Tsagris and Manos Papadakis.
R implementation and documentation: Michail Tsagris mtsagris@uoc.gr and Manos Papadakis papadakm95@gmail.com.
boot.student2, perm.ttest2, welch.tests, jack.mean
x <- rexp(50)
a <- kernel(x, h = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.