varkernel | R Documentation |
Density, CDF, quantile, and RNG functions for empirical distributions estimated with variable-bandwidth kernels.
dvarkde(x, obj, log = FALSE) pvarkde(x, obj, log.p = FALSE) qvarkde(x, obj, log.p = FALSE) rvarkde(n, obj)
x |
Vector of quantiles |
obj |
A |
log |
Flag indicating that log density should be returned |
log.p |
Flag indicating that DF probabilities are logs |
n |
Number of random values to generate |
p |
Vector of probabilities |
In the RNG functions for built-in distributions n
can be passed as a
vector, in which case the length of the vector is the number of deviates to
generate. The main purpose of this functionality seems to be to generate subtle
and hard to debug errors; therefore, it is not supported here. Passing
a vector for n
will generate a warning, and the first value will be used.
dvarkde
: Density function
pvarkde
: Cumulative distribution function
qvarkde
: Quantile function
rvarkde
: Random deviate generator
For all of these functions we evaluate the kernel density estimate on a grid
of x (or p) values and construct an interpolating function. Because of this
it isn't guaranteed that the mathematical relationships between the functions
will necessarily hold exactly. That is, pkde
will not necessarily equal the
integral of dkde
, and qkde
may not be an exact inverse of qkde
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.