Learn R Programming

D3M (version 0.41.1)

d3m: Two Sample Test with Distribution-Valued Data

Description

Two Sample Test with Distribution-Valued Data

Usage

d3m(cases, control, rm.mean = FALSE, rm.var = FALSE, paranum = 101, q = 2, bsn = 5000, seed = 100)

Arguments

cases
name of case group data (matrix)
control
names of control group data (matrix)
rm.mean
standarize each rows of cases and control to mean=0.
rm.var
standarize each rows of cases and control to var=1.
paranum
the number of quatile discretization + 1. Default is discretized by 1 %.
q
power of Wasserstein metric. Default is q = 2.
bsn
the number of resampling. Default is bsn = 5000.
seed
seed for random number generator.

Value

pval p-value.test.stat test statistic.cases case group data used in the statistical test.control control group data used in the statistical test.

Details

this function is designed for two sample test based on Wasserstein metric. The function computes the the p-values based Wasserstein metric and resampling method. If rm.mean=F and rm.var=F, then statistical test is performed only based on more than 3rd order moments.

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)
d3m(cases,control,paranum = 101, q = 2, bsn = 1000,seed = 100)

Run the code above in your browser using DataLab