# dot-wassersteinTestAsy: Asymptotic theory-based test using the 2-Wasserstein distance... In goncalves-lab/diffexpR: Statistical tests for detecting differential distributions based on the 2-Wasserstein distance

## Description

Two-sample test to check for differences between two distributions using the 2-Wasserstein distance: Implementation using a test based on asymptotic theory

## Usage

 `1` ```.wassersteinTestAsy(x, y) ```

## Arguments

 `x` sample (vector) representing the distribution of condition A `y` sample (vector) representing the distribution of condition B

## Details

This is the asymptotic version of `wasserstein.test`, for the semi-parametric procedure see `.wassersteinTestSp`.

Details concerning the testing procedure based on asymptotic theory can be found in Schefzik et al (2020).

Note that the asymptotic theory-based test should only be employed when the two samples x and y can be assumed to come from continuous distributions.

## Value

A vector of 13, see Schefzik et al. (2020) for details:

• d.wass: 2-Wasserstein distance between the two samples computed by quantile approximation

• d.wass^2: squared 2-Wasserstein distance between the two samples computed by quantile approximation

• d.comp^2: squared 2-Wasserstein distance between the two samples computed by decomposition approximation

• d.comp: 2-Wasserstein distance between the two samples computed by decomposition approximation

• location: location term in the decomposition of the squared 2-Wasserstein distance between the two samples

• size: size term in the decomposition of the squared 2-Wasserstein distance between the two samples

• shape: shape term in the decomposition of the squared 2-Wasserstein distance between the two samples

• rho: correlation coefficient in the quantile-quantile plot

• pval: p-value of the 2-Wasserstein distance-based test using asymptotic theory

• perc.loc: fraction (in %) of the location part with respect to the overall squared 2-Wasserstein distance obtained by the decomposition approximation

• perc.size: fraction (in %) of the size part with respect to the overall squared 2-Wasserstein distance obtained by the decomposition approximation

• perc.shape: fraction (in %) of the shape part with respect to the overall squared 2-Wasserstein distance obtained by the decomposition approximation

• decomp.error: relative error between the squared 2-Wasserstein distance obtained by the quantile approximation and the squared 2-Wasserstein distance obtained by the decomposition approximation

## References

Schefzik, R., Flesch, J., and Goncalves, A. (2020). waddR: Using the 2-Wasserstein distance to identify differences between distributions in two-sample testing, with application to single-cell RNA-sequencing data.

goncalves-lab/diffexpR documentation built on Oct. 26, 2021, 5:08 p.m.