distance: Distance

Description Usage Arguments Details Value Author(s) Examples

View source: R/distance.r

Description

Dissimilarity matrix calculation.

Usage

1
distance(plus, minus, nsample, alpha = 0, method = "cos")

Arguments

plus

p*n matrix. Each element represents the posterior probablity of a gene to be positive DE.

minus

p*n matrix. Each element represents the posterior probablity of a gene to be negative DE.

nsample

Total number of posterior samples excluding burning period.

alpha

Forge parameter

method

Choose one from those: cos, KL, L1, L2, L2_2D, Hellinger.

Details

Based on DE posterior probablity of gene*study matrix, calculate gene-gene distance

Value

Dissimilarity matrix. p*p

Author(s)

Zhiguang Huo <zhuo@ufl.edu>

Examples

1
2
3
4
5
6
G<-10
S<-3
nsample <- 10000
plus <- matrix(c(sample(nsample,G*S,replace = TRUE),rep(0,G*S)),2*G,S)
minus <- matrix(c(rep(0,G*S),sample(nsample,G*S,replace = TRUE)),2*G,S)
dissimilarity <- distance(plus, minus, nsample)

Caleb-Huo/BayesMP documentation built on May 6, 2019, 9:27 a.m.