Learn R Programming

D3M (version 0.41.1)

wasser.test: Statistical Test with Wasserstein Metric

Description

Statistical Test with Wasserstein Metric

Usage

wasser.test(cases, control, test.stat, paranum = 101, bsn = 5000, q = 2, seed = 100)

Arguments

cases
name of case group data (matrix sample * feature)
control
names of control group data (matrix sample * feature)
test.stat
test statistic
paranum
the number of quatile discretization + 1. Default is discretized by 1 %.
bsn
the number of resampling. Default is bsn = 5000.
q
power of Wasserstein metric. Default is q = 2.
seed
seed for random generator.

Value

list of p-value and test statistics.

References

Yusuke Matsui, Masahiro Mizuta, Satoru Miyano and Teppei Shimamura.(2015) D3M:Detection of differential distributions of methylation patterns (submitted). BIORXIV/2015/023879.

Antonio Irpino and Rossanna Verde.(2015) Basic Statistics for distributional symbolic variables: a new metric-based approach. Adv.Data.Anal.Classif(9) 143--175

Examples

Run this code
nrep <- 12
cases <- Map(rbeta,rep(30,nrep),rep(1,nrep),rep(5,nrep))
cases <- do.call("rbind",cases)
control <- Map(rbeta,rep(30,nrep),rep(1,nrep),rep(5,nrep))
control <- do.call("rbind",control)
d <- wasserMetric(cases,control)
testRes <- wasser.test(cases = cases,control = control,test.stat = d)

Run the code above in your browser using DataLab