[R] Extracting t values from object of class `"pairwise.htest"'
mschwartz at medanalytics.com
Thu Oct 10 22:49:01 CEST 2002
> -----Original Message-----
> From: Peter Dalgaard BSA [mailto:p.dalgaard at biostat.ku.dk]
> "Marc Schwartz" <mschwartz at medanalytics.com> writes:
> > > -----Original Message-----
> > > Achim Zeileis writes:
> > > > Sven Garbade wrote:
> > > > >
> > > > > Hi,
> > > > >
> > > > > can I extract the p-values after a pairwise comparision with
> > > > > pairwise.t.test()? The object of class "pairwise.htest".
> > > >
> > > > This is a list with one component being "p.value". You can
> > it as
> > > > usual with
> > > > pairwise.t.test()$p.value
> > >
> > > Sorry, I don't mean the p-values, but the t-values.
> > That would be:
> > pairwise.t.test(...)$statistic
> > Look at ?t.test and scroll to the "Value" section which defines the
> > components returned.
> But pairwise.t.test doesn't return the individual t statistics. It
> ends with
> ans <- list(method = METHOD, data.name = DNAME, p.value = PVAL,
> p.adjust.method = p.adjust.method)
> class(ans) <- "pairwise.htest"
> so you'd have to modify the function to get at the actual t
Thanks Peter. I stand corrected. I missed the now obvious and not so
subtle difference in the class objects of htest and pairwise.htest.
r-help 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-help-request at stat.math.ethz.ch
More information about the R-help