wasserMetric: Computing Wasserstein Metric

Description Usage Arguments Value Author(s) Examples

View source: R/wasser.R

Description

Computing Wasserstein Metric

Usage

1
wasserMetric(cases, control, paranum = 101, q = 2)

Arguments

cases

name of case group data (matrix sample * feature).

control

names of control group data (matrix sample * feature).

paranum

the number of quatile discretization + 1. Default is discretized by 1%.

q

power of Wasserstein metric. Default is q = 2.

Value

vector of Wasserstein metric

Author(s)

Yusuke Matsui & Teppei Shimamura

Examples

1
2
3
4
5
6
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)
wasserMetric(cases,control)

Example output

 [1] 16.766740  5.590329  3.597102  5.203953  5.275423  2.527876  7.137964
 [8]  8.555267  4.625376  6.015827  6.665015  1.938880

D3M documentation built on May 30, 2017, 7:19 a.m.