The R Project SVN R

Rev

Rev 51765 | Rev 52786 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 51765 Rev 52733
Line 1... Line 1...
1
 
1
 
2
R version 2.12.0 Under development (unstable) (2010-04-18 r51761)
2
R version 2.12.0 Under development (unstable) (2010-08-14 r52732)
3
Copyright (C) 2010 The R Foundation for Statistical Computing
3
Copyright (C) 2010 The R Foundation for Statistical Computing
4
ISBN 3-900051-07-0
4
ISBN 3-900051-07-0
5
 
5
 
6
R is free software and comes with ABSOLUTELY NO WARRANTY.
6
R is free software and comes with ABSOLUTELY NO WARRANTY.
7
You are welcome to redistribute it under certain conditions.
7
You are welcome to redistribute it under certain conditions.
Line 2983... Line 2983...
2983
> 
2983
> 
2984
> ### ** Examples
2984
> ### ** Examples
2985
> 
2985
> 
2986
> require(stats)
2986
> require(stats)
2987
> ## Student's paired t-test
2987
> ## Student's paired t-test
-
 
2988
> with(sleep,
-
 
2989
+      t.test(extra[group == 1],
2988
> t.test(extra ~ group, data = sleep, paired = TRUE)
2990
+             extra[group == 2], paired = TRUE))
2989
 
2991
 
2990
	Paired t-test
2992
	Paired t-test
2991
 
2993
 
2992
data:  extra by group 
2994
data:  extra[group == 1] and extra[group == 2] 
2993
t = -4.0621, df = 9, p-value = 0.002833
2995
t = -4.0621, df = 9, p-value = 0.002833
2994
alternative hypothesis: true difference in means is not equal to 0 
2996
alternative hypothesis: true difference in means is not equal to 0 
2995
95 percent confidence interval:
2997
95 percent confidence interval:
2996
 -2.4598858 -0.7001142 
2998
 -2.4598858 -0.7001142 
2997
sample estimates:
2999
sample estimates: