Provided a point, a data frame, and lambda, this function calculates the weights each observation in the data frame provides the calculations
1 | calculate_weights(dist, lambda, kernel, weighting_var)
|
dist |
distance vector |
lambda |
The radius of the kernel for tri-cubic, Epanechnikov, and flat kernels. The standard deviation for the Gaussian kernel. |
kernel |
type of kernel to use for weight calculation |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.