Are post-hoc tests being developed for R?

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
15 Jul 1998 13:27:58 +0200


Thomas Lumley <thomas@biostat.washington.edu> writes:

> p.adjust<-function(p,method=c("hochberg","holm","bonferroni"),...){
>   how<-pmatch(method[1],c("hochberg","holm","bonferroni"))
>   if (is.na(how)) stop(paste("Don't know method:",method))
>   m<-match.call()
>   m[[1]]<-as.name(paste("p.adjust",c("hochberg","holm","bonferroni")[how],sep="."))
>   m$method<-NULL
>   eval(m,sys.parent())
> }

Been a while since you wrote that? Surely, you mean:

> p.adjust
function (p, method = c("hochberg", "holm", "bonferroni"), ...) 
{
            how <- match.arg(method)
            FUN <- get(paste("p.adjust", how, sep = "."))
            FUN(p, ...)
}


-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._