D2Gs: Convert pairwise distance matrix to Gower matrix

Description Usage Arguments Value References

View source: R/D2GK.R

Description

Adapted from the GRV R codes (Minas et al., 2013). Modified for better efficiency avoiding unnecessary matrix products. Can show G_{ij}= -0.5(D_{ij}^2-\bar{D^2}_{i,}-\bar{D^2}_{.,j}+\bar{D^2}), where \bar{D^2}_{i,},\bar{D^2}_{,j},\bar{D^2} are row, column and global averages. For symmetric distance matrix, \bar{D^2}_{i,}=\bar{D^2}_{,i}. Note that G could be non-positive definite, and no further transformations are applied to G to make it non-negative definite.

Usage

1

Arguments

D

pairwise distance matrix

Value

G centered Gower matrix

References

Minas, C., Curry, E., Montana, G., 2013. A distance-based test of association between paired heterogeneous genomic data. Bioinformatics 29, 2555<e2><80><93>2563. http://wwwf.imperial.ac.uk/~gmontana/grv.html

Guo,B. and Wu,B. (2017) On the fast small-sample kernel independence test for microbiome community-level association analysis. Biometrics, doi:10.1111/biom.12823.


baolinwu/MiRV documentation built on May 28, 2019, 6:37 p.m.