ovl.test: Permutation test to assess significance of distribution...

View source: R/ovl.test.R

ovl.testR Documentation

Permutation test to assess significance of distribution overlap

Description

Assess significance of distribution overlap. User need to specify which method to use to calculate distribution overlap. This function test whether given two samples are drawn from the same distribution or not. i.e., H0: complete overlap. Two distributions are the same. E(OVL) = 1. H1: Two distributions are different.

Usage

ovl.test(
  x1,
  x2,
  method = c("hist", "distfit", "knn", "kde"),
  nperm = 1000,
  seed = TRUE
)

Arguments

x1

A numeric vector.

x2

A numeric vector.

method

method to calculate distribution overlap

nperm

An integer. Number of permutation performed. default is 1000.

seed

A logical value. default is TRUE. set seed for reproducibility.

Value

test statistic (overlap) and permutation p-value

Author(s)

Seongyong Park (2020-08-18)

Examples

x1 = rnorm(100, 0)
x2 = rnorm(100, 1)
ovl.test(x1, x2, method = "hist", nperm = 1000)

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