KLD.matrix {bioDist}R Documentation

Continuous version of Kullback-Leibler Distance (KLD)

Description

Calculate KLD by estimating by smoothing log( f(x)/g(x))*f(x) and then integrating.

Usage

KLD.matrix(x, method = c("locfit", "density"), supp = c(-3, 3), 
     subdivisions = 1000, diag = FALSE, upper = FALSE)

Arguments

x n by p matrix
method use locfit or density to estimate integrand
supp upper and lower limits of the integral
subdivisions subdivisions for the integration
diag if TRUE, diagonal of the distance matrix will be displayed
upper if TRUE, upper triangle of the distance matrix will be displayed

Details

The pairwise distances between the rows of x are computed.

Value

An object of class dist with the pairwise, between rows, Kullback-Leibler distances.

Author(s)

Beiying Ding, Vincent Carey

See Also

cor.dist, spearman.dist, tau.dist, dist, KLdist.matrix,mutualInfo

Examples

 x <- matrix(rnorm(100),nrow=5)
 KLD.matrix(x, method="locfit",supp=range(x))

[Package bioDist version 1.2.0 Index]