Re: [R] extract t-values from pairwise.t.test

From: Simon Blomberg <blomsp_at_ozemail.com.au>
Date: Mon 08 Aug 2005 - 17:12:27 EST

I think the questioner was interested in pairwise.t.test. See ?pairwise.t.test. From looking at the source, pairwise.t.test calls t.test if sd's are not pooled, or calculates its own t.val if sds are pooled. It looks very easy to hack to return the t values instead of the p values.

Simon.

At 04:46 PM 8/08/2005, Petr Pikal wrote:
>Hallo
>
>My output lists more than p-values
>
> > ttt<-t.test(rnorm(10), rnorm(10), paired=T)
> > ttt
>
> Paired t-test
>
>data: rnorm(10) and rnorm(10)
>t = 1.7508, df = 9, p-value = 0.1139
>alternative hypothesis: true difference in means is not equal to 0
>95 percent confidence interval:
> -0.1750263 1.3735176
>sample estimates:
>mean of the differences
> 0.5992456
>
> > str(ttt)
>List of 9
> $ statistic : Named num 1.75
> ..- attr(*, "names")= chr "t"
> $ parameter : Named num 9
> ..- attr(*, "names")= chr "df"
> $ p.value : num 0.114
> $ conf.int : atomic [1:2] -0.175 1.374
> ..- attr(*, "conf.level")= num 0.95
> $ estimate : Named num 0.599
> ..- attr(*, "names")= chr "mean of the differences"
> $ null.value : Named num 0
> ..- attr(*, "names")= chr "difference in means"
> $ alternative: chr "two.sided"
> $ method : chr "Paired t-test"
> $ data.name : chr "rnorm(10) and rnorm(10)"
> - attr(*, "class")= chr "htest"
> > ttt$statistic
> t
>1.750790
> >
>
>The output is list and you can call any part of it by its name or by []
>braces.
>
>HTH
>Petr
>
>
>
>
>On 8 Aug 2005 at 16:26, Guido Parra Vergara wrote:
>
> > Hi,
> >
> > how can I extract the t-values after running a pairwise.t.test? The
> > output just list the p-values. Many thanks for your help.
> >

> > Cheers
> > Guido
> >
> >
> >
> > ____________________________________
> >
> > Guido J. Parra
> > School of Tropical Environment Studies and Geography
> > James Cook University
> > Townsville
> > Queensland 4811
> >
> > Phone: 61 7 47815824
> > Fax: 61 7 47814020
> > Mobile: 0437630843
> > e-mail: guido.parravergara@jcu.edu.au
> >
> > ______________________________________________
> > R-help@stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
>
>Petr Pikal
>petr.pikal@precheza.cz
>
>______________________________________________
>R-help@stat.math.ethz.ch mailing list
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Aug 08 17:16:50 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 15:08:23 EST