[R] cor and missing values. Bug?

Peter Dalgaard p.dalgaard at biostat.ku.dk
Wed May 26 01:22:44 CEST 2004


Jane Fridlyand <janef at stat.berkeley.edu> writes:

> There seems to be an issue in computing rank correlations with missing
> values present. I think this comes from the way rank() function works but
> I am not sure how to go about this. Rank function places missing values at
> the end by default thus skewing the rank relationship between two vectors:
> 
> Example:
> 
> R : Copyright 2003, The R Foundation for Statistical Computing
> Version 1.8.1  (2003-11-21), ISBN 3-900051-00-3

Not to put too fine a point on it, but did you consider checking the
NEWS file for the most recent version (1.9.0,
http://cran.r-project.org/src/base/NEWS)?

    o   The cor() function did not remove missing values in the
        non-Pearson case.



-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907




More information about the R-help mailing list