Earl F. Glynn
2004-Oct-21 22:11 UTC
[R] p.adjust with "hommel" method doesn't allow NAs but other methods do?
Is this expected behavior? I've got 77 NAs in a vector of 6875 p values: # Hommel method fails> p <- p.adjust(r$p,"hommel")Error: NAs are not allowed in subscripted assignments In addition: Warning message: longer object length is not a multiple of shorter object length in: n * p/(1:n) # These work fine> p <- p.adjust(r$p,"none") > p <- p.adjust(r$p,"bonferroni") > p <- p.adjust(r$p,"holm") > p <- p.adjust(r$p,"hochberg") > p <- p.adjust(r$p,"fdr")> sum(is.na(r$p))[1] 77> length(r$p)[1] 6875 When I removed these NAs myself, why does the "hommel" method take perhaps 300 times (or more) longer than the other methods? The Hommel method took over 5 minutes for this set of 6875 when the other methods were less than a second. I'm using Windows 2000 and R 2.0.0 efg