Why can't I get a p-value smaller than 2.2e-16?

前端 未结 6 776
死守一世寂寞
死守一世寂寞 2020-12-13 18:13

I\'ve found this issue with t-tests and chi-squared in R but I assume this issue applies generally to other tests. If I do:

a <- 1:10
b <- 100:110
t.t         


        
6条回答
  •  臣服心动
    2020-12-13 18:52

    Some R packages solve this issue. The best way is through package pspearman.

    source("http://www.bioconductor.org/biocLite.R")
    biocLite("pspearman")
    library("pspearman")
    a=c(1:110,110)
    b=1:111
    out <- spearman.test(a, b, alternative = "greater", approximation="t-distribution")
    out$p.value
    

    [1] 3.819961e-294

提交回复
热议问题