I am trying to calculate a Kullback-Leibler divergence from two
vectors with integers but get NA as a result when trying to calulate
the measure. Why?

x <- cbind(stuff$X, morestuff$X)

x[1:5,]

     [,1] [,2]
[1,]  293  938
[2,]  293  942
[3,]  297  949
[4,]  290  956
[5,]  294  959

KLdiv(x)


     [,1] [,2]
[1,]    0   NA
[2,]   NA    0


Best,
Ralf

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to