[R] Error when using qvalue function

Ana Marija @okov|c@@n@m@r|j@ @end|ng |rom gm@||@com
Mon Oct 28 22:37:47 CET 2019


I am trying to calculate True Positive Rate, TPR with this procedure:

    qval_obj=qvalue(pvals) #is false discovery rate
    pi1=1-qval_obj$pi0 #TPR
    pi1  #TPR

But I am getting this error:

    Error in smooth.spline(lambda, pi0, df = smooth.df) :
       missing or infinite values in inputs are not allowed

I have 91 p values and they look like this:

> pvals
     [1] 6.919239e-02 1.073784e-01 1.218613e-01 1.586202e-01
1.370340e-01 3.452574e-02 2.545619e-01 1.676715e-02 8.571197e-01
    [10] 8.649025e-01 1.777414e-02 6.801867e-01 6.873085e-01
1.276566e-01 5.907002e-02 2.343207e-02 2.078125e-02 6.404511e-02
    [19] 3.306593e-02 9.411259e-04 1.038989e-03 4.734674e-05
3.422489e-05 5.606264e-05 6.322817e-02 1.291268e-02 3.452596e-03
    [28] 1.770753e-01 3.285821e-01 2.292055e-02 5.503168e-02
6.940048e-01 3.638889e-03 6.799640e-01 1.301045e-02 6.794010e-01
    [37] 2.339327e-02 1.038529e-01 3.137687e-04 2.148050e-02
1.783068e-01 1.764518e-01 6.386686e-03 1.670062e-02 3.220291e-01
    [46] 5.568613e-01 8.886102e-01 5.031040e-01 3.760079e-01
6.638034e-02 9.419648e-03 5.885266e-03 1.539809e-02 5.296551e-03
    [55] 2.425230e-02 5.023091e-01 4.547284e-03 1.850796e-01
9.389289e-02 6.544873e-03 3.031956e-03 7.772671e-03 9.073974e-03
    [64] 9.118352e-02 4.075408e-04 6.902206e-01 6.929767e-02
1.897121e-02 6.693074e-02 1.111308e-02 1.286147e-02 4.515834e-02
    [73] 8.886941e-01 8.891051e-01 3.792846e-01 5.368898e-01
2.323894e-01 3.220141e-01 7.320883e-02 9.642521e-03 6.024415e-01
    [82] 2.459322e-02 2.873351e-01 8.477168e-01 1.351068e-02
1.053550e-01 4.812686e-01 1.404957e-01 9.835912e-02 4.373995e-01
    [91] 8.803856e-02

Please advise,

More information about the R-help mailing list