NaN in ranksum test
Mostrar comentarios más antiguos
Hi,
I know there is a nanmedian function, but it seems there is no nanranksum function. I have tried the ranksum function with and without NaN values filling in empty data and I get different p values. Am I wrong? Is there a Wilcoxon ranksum / Mann-Whitney U test that ignores NaN values?
Thanks for your help!
Respuesta aceptada
Más respuestas (1)
Açmae
el 3 de Jun. de 2013
@ Daniel and Eric:
In R2012b and beyond, the test:
p = ranksum(x(~isnan(x)), y(~isnan(y)))
is performed in the function RANKSUM to remove any missing data, and thus takes care of NaN's. If you are using versions older than R2012b, then this is the workaround.
Categorías
Más información sobre NaNs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!