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

Petr Pikal petr.pikal at precheza.cz
Mon Aug 8 08:46:17 CEST 2005


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 at jcu.edu.au
> 
> ______________________________________________
> R-help at 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 at precheza.cz




More information about the R-help mailing list