kernel.bandwidth | R Documentation |
Computes the Gaussian-kernel (Radial Basis Function) bandwidth \sigma
using the median-heuristic (inverse of the median of squared Euclidean distances),
and returns a bootstrap confidence interval. This assumes the kernel is
parameterized as k(x_i, x_j) = \exp(-\sigma ||x_i - x_j||^2)
.
kernel.bandwidth(
comm,
scale_data = FALSE,
ci_type = "bca",
runs = 1000,
conf = 0.95,
cores = 1
)
comm |
A numeric matrix or data frame. |
scale_data |
Logical; if |
ci_type |
Character; passed to |
runs |
Integer; number of bootstrap resamples. |
conf |
Confidence level for the CI (between 0 and 1). |
cores |
Number of cores to be used in parallel processing. If = 0 all available cores are used. |
An object of class sigma_bootstrap_result
containing:
sigma_original |
Point estimate from the full data. |
sigma_bootstrap |
Bootstrap mean estimate. |
bootstrap_se |
Bootstrap standard error. |
ci |
Confidence interval object from |
bootstrap_distribution |
Vector of bootstrap values. |
boot_object |
The full boot object from |
Carvalho, J.C. & Cardoso, P. (2025) Quantifying species distribution within the functional space.
boot
, boot.ci
set.seed(1)
comm <- matrix(rexp(200, rate = 0.1), ncol = 4)
res <- kernel.bandwidth(comm, runs = 99)
print(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.