Ticket #836: inexacts.patch
File inexacts.patch, 786 bytes (added by , 13 years ago) |
---|
-
statistics.scm
1495 1495 (- yi-rank mean-y-rank))) 1496 1496 average-x-ranks average-y-ranks))) 1497 1497 (rs (if (> (* Lxx Lyy) 0) (/ Lxy (sqrt (* Lxx Lyy))) 0)) ; TODO: think about rs = 1 1498 (rs (exact->inexact rs)) ; Do not return ratnums 1498 1499 (ts (if (= 1 rs) 1 (/ (* rs (sqrt (- n 2))) (sqrt (- 1 (square rs)))))) 1500 (ts (exact->inexact ts)) ; Do not return ratnums 1499 1501 (p (t-significance ts (- n 2) #:tails ':both))) 1500 1502 (format #t "~%Spearman correlation coefficient ~f, p = ~f~%" rs p) 1501 1503 (values rs p))))