Description Usage Arguments Value Examples
View source: R/compak_evalpmf.R
This function computes the density using the CMP_mu discrete kernel smooth over a grid of points using the given bandwidth h
or dispersion parameter nu
.
1 | compak_evalpmf(a.sample, x = NULL, h = NULL, nu = NULL, workers = 1L)
|
a.sample |
numeric vector: the data sample from which estimate is to be computed. |
x |
Either |
h, nu |
numeric: the bandwidth or smoothing parameter. Only one is needed and they are related by nu = 1/h. |
workers |
numeric; a positive integer to represent the number of cores used for parallel processing to evaluate the kde |
A list containing the following components:
f.cmp |
the estimated p.m.f. values |
kernel.est |
a list that contains the estimated kernel at each grid point |
1 2 3 4 | data(days)
# The bandwidth h can be the one obtained by cross validation.
(h.CV <- compak_CVbandwidth(days))
compak_evalpmf(days, 20:40, h = h.CV, workers = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.