ovl_kde | R Documentation |
Calculate distribution overlap by KDE (Kernel Density Estimation) This function compares two estimated distributions by KDE method. It utilizes base density function in R.
ovl_kde(x1, x2, n = 1024)
x1 |
A numeric vector. |
x2 |
A numeric vector. |
n |
An integer. Number of bins in KDE. |
estimated overlap between two distributions (range: 0 to 1)
Seongyong Park (2020-08-18)
This code is adopted from overlapping package (paper) and modified by Seongyong Park. You can find original implementation in overlapping R package. (github)
overlap
x1 = rnorm(100, 0) x2 = rnorm(100, 1) ovl_kde(x1, x2, n=1024)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.