ovl_hist: Calculate distribution overlap by histogram

View source: R/hist.R

ovl_histR Documentation

Calculate distribution overlap by histogram

Description

Calculate distribution overlap by histogram. Width of bin is adjusted according to the number of samples. This function compares two estimated distributions by histogram. It utilizes hist function in R.

Usage

ovl_hist(x1, x2)

Arguments

x1

A numeric vector.

x2

A numeric vector.

Value

estimated overlap between two distributions (range: 0 to 1)

Author(s)

Seongyong Park (2020-08-18)

References

This code is adopted from GCNR paper. (paper) The original code was matlab but I implemented it in the R. No code base is available. please contact to Alfonso <alfonso.r.molares@ntnu.no> The original implementation used fixed sized bin (n=100) but I used adaptive bin size selection method proposed in PRE. (paper)

Examples

x1 = rnorm(100, 0)
x2 = rnorm(100, 1)
ovl_hist(x1, x2)

psychemistz/ovltools documentation built on April 1, 2022, 2:26 a.m.