Calculate distribution overlap by distribution fitting. User need to specify which distribution family to use. This function estimates population distribution from sample distributions. It utilizes fitdist function in fitdistrplus R package.

ovl_distfit(x1, x2, family = c("norm", "lognorm", ...))

Arguments

x1

A numeric vector.

x2

A numeric vector.

family

A string to specify the distribution family.

Value

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

See also

Author

Seongyong Park (2020-08-18)

Examples

x1 = rnorm(100, 0) x2 = rnorm(100, 1) ovl_distfit(x1, x2, family="norm")
#> [1] 0.6531457