Learn R Programming

psycho (version 0.4.91)

overlap: Overlap of Two Empirical Distributions.

Description

A method to calculate the overlap coefficient of two kernel density estimates (a measure of similarity between two samples).

Usage

overlap(x, y, method = "trapezoid")

Arguments

x

A vector of values from a probability distribution (e.g., posterior probabilities from MCMC sampling).

y

Scalar between 0 and 1, indicating the mass within the credible interval that is to be estimated.

method

Method of AUC computation. Can be "trapezoid" (default), "step" or "spline".

Examples

Run this code
# NOT RUN {
library(psycho)

x <- rnorm(100, 1, 0.5)
y <- rnorm(100, 0, 1)
overlap(x, y)
# }

Run the code above in your browser using DataLab