dkernelBC | R Documentation |
Computes the boundary-corrected version of a smoothing kernel density function.
dkernelBC(x, mean, sd = 1, kernel = "gaussian",
zerocor = c("none", "weighted", "convolution",
"reflection", "bdrykern"))
x |
Numeric. Values of the function argument, at which the function should be evaluated. |
mean |
Numeric. The mean of the uncorrected kernel. |
sd |
Numeric value. The standard deviation of the uncorrected kernel. |
kernel |
Character string giving the name of the kernel
as recognised by |
zerocor |
String (partially matched) specifying a correction for the boundary effect
bias at |
The kernel density function identified by kernel
with standard deviation sd
and mean mean
will be computed, and truncated onto the positive half-line.
The boundary correction specified by zerocor
will then
be applied. The result is the vector of corrected density values.
Numeric value or numeric vector.
.
densityBC
to compute a density estimate using
the boundary-corrected kernel.
dkernel
to compute the un-corrected
kernel density function, and density.default
to compute
an uncorrected density estimate.
match.kernel
for the list of
recognised names of kernels.
curve(dkernelBC(x, mean=1, zerocor="none"), to=5)
curve(dkernelBC(x, mean=1, zerocor="weighted"), to=5)
curve(dkernelBC(x, mean=1, zerocor="reflection"), to=5)
curve(dkernelBC(x, mean=1, zerocor="convolution"), to=5)
curve(dkernelBC(x, mean=1, zerocor="bdrykern"), to=5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.