Displaying 1 result from an estimated 1 matches for "logdenom".
2023 Mar 01
1
Incorrect behavior of ks.test and psmirnov functions with exact=TRUE
...51)), list(range(51, 101)),
alternative="greater", method="exact")
returns 9.911653021418333e-30.
I've tried to dig in a bit and the problem comes down to how the final
value is calculated in psmirnov function:
if (log.p & !lower.tail)
return(log1p(-ret/exp(logdenom)))
if (!log.p & !lower.tail)
return(1 - ret/exp(logdenom))
There exp(logdenom) is a relatively good (but not perfect) approximation of
combination(100, 50) = 1.008913e+29, ret is also a good approximation of
combination(100, 50)-1 = 1.008913e+29 but there is not enough double
preci...