Closed katwre closed 7 years ago
Hi,
This is not a qvalue
issue:
x <- c(2 , 1 ,641, 234)
ft <- fisher.test(matrix(as.numeric( x) ,ncol=2,byrow=F),conf.int = F)$p.value
ft[1]>1 # problem
sprintf("%.20f",ft)
floor(ft[1])>1 # floor fixes problem
What you can try is to loop over the vector ft
and if the numerical value is >1
then set it to 1
. It would be dangerous to implement this in the package because the warning message is to make people aware of nonsensical p-values (>1). In this case, it seems to be a numerical issue with fisher.test
.
Cheers
Hi, I get an error
p-values not in valid range [0, 1]
after calling theqvalue
function. This error occurs using p-values from the fisher.test function and I am not able to fix it. Some p-values are only above 1 by an amount that was less than machine precision. Could you help with that?Here is an example that reproduces the error:
Kasia