[BioC] warning message in KS test

Francois Pepin fpepin at cs.mcgill.ca
Fri Oct 19 04:27:10 CEST 2007


Hi James,

I did not say that your question shouldn't be asked. It is valid and I'd
sure want to know if it happened to me. I simply meant that the R-help
list could a be more appropriate place to ask.

I doubt the warning is linked to your getting NAs (which you hadn't
mentioned in your previous e-mail). That warning clear well documented
in the help page for ks.test. I don't know why you are getting NAs as
your answers. I cannot reproduce it with the most recent R version, even
if I include NA or NULL values.

If you post the exact values (or a small reproducible example) for which
this happens, we are more likely to be able to help. Also, please
include the output from sessionInfo().

Francois

On Thu, 2007-10-18 at 18:52 -0700, James Anderson wrote:
> Francois,
> 
> I would not post on Bioconductor list if I can still get some answer
> with the warning, I found a bunch of p values are shown as NA, but I
> can get values out using matlab, so I am wondering what is the EXACT
> reason why it shows as NA. 
> I am sorry for being off-topic on Bioconductor, it would be great if
> you can tell me the R help email list. I just don't know this, right
> now Bioconductor list is the only list I am seeking help, thanks.
> 
> James
> 
> Francois Pepin <fpepin at cs.mcgill.ca> wrote:
>         Hi James,
>         
>         Please note that there is nothing bioconductor specific in
>         this
>         question. You might want to use the R-help list instead next
>         time. You
>         are more likely to get a useful answer from there and it
>         reduces the
>         clutter on this one.
>         
>         This being said, a warning is not an error, you should still
>         get a
>         result. The warning simply means that the KS test will not
>         give an exact
>         pvalue if you have identical values in one (or both) of your
>         distribution. You still get an estimate that I've found to be
>         usable
>         when I've used it.
>         
>         Francois
>         
>         On Thu, 2007-10-18 at 15:37 -0700, James Anderson wrote:
>         > Hi, 
>         > 
>         > I am trying to use ks test to do gene selection for
>         microarray data. 
>         > Suppose A is my matrix with 5000 genes and 60 samples, the
>         first 30 samples are in class 0, the other 30 samples are in
>         class 1. 
>         > 
>         > I use the following command to calculate the pvalue for each
>         gene. 
>         > 
>         > index_class0 = which(ClassLabel == 0)
>         > index_Class1 = which(ClassLabel == 1)
>         > PvalsAll <- apply(A, 1, function(x) ks.test(x[index_class0],
>         x[index_class1],
>         > exact = NULL)$p.value)
>         > 
>         > I got some warning message like:
>         > 
>         > In ks.test(x[index_class0], x[index_class1], exact = NULL) :
>         > cannot compute correct p-values with ties
>         > 
>         > but with the same data, I can get some values using matlab
>         statistics toolbox, does anyone have similar experience? How
>         to fix this problem?
>         > 
>         > Many thanks,
>         > 
>         > James
>         > 
>         > __________________________________________________
>         > 
>         > 
>         > 
>         > [[alternative HTML version deleted]]
>         > 
>         > _______________________________________________
>         > Bioconductor mailing list
>         > Bioconductor at stat.math.ethz.ch
>         > https://stat.ethz.ch/mailman/listinfo/bioconductor
>         > Search the archives:
>         http://news.gmane.org/gmane.science.biology.informatics.conductor
>         
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
>



More information about the Bioconductor mailing list