| silverman_bandwidth | R Documentation |
Implements Silverman's rule of thumb for selecting an optimal bandwidth in kernel density estimation.
silverman_bandwidth(X, kernel_type = "normal")
X |
A numerical vector of sample data. |
kernel_type |
A string identifying the kernel type. |
A scalar representing the optimal bandwidth.
# Generate sample data
X <- rnorm(100)
# Get optimal bandwidth using Silverman's rule
h_opt <- silverman_bandwidth(X, kernel_type = "normal")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.