R language Access Menu

Effect size for comparison of 2 numeric groups

Analysis here is generally very similar to tests for 2 unpaired numeric groups. 

Student's t-test
Only paired=T option is needed, rest being as in unpaired groups section: 

code:

> xx
 [1]  6  1  3  9 10  7  8  4  5  2
> yy
 [1]  3  6  9  1  4  8  5 10  7  2


> t.test(xx,yy, paired=T)

        Paired t-test

data:  xx and yy
t = 0, df = 9, p-value = 1
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
 -3.536819  3.536819
sample estimates:
mean of the differences 
                      0 

Non-parametric test
Here also only paired=T needs to be added to Wilcoxan test: 

code:

> wilcox.test(xx,yy, paired=T)

        Wilcoxon signed rank test with continuity correction

data:  xx and yy
V = 23, p-value = 1
alternative hypothesis: true location shift is not equal to 0

Warning messages:
1: In wilcox.test.default(xx, yy, paired = T) :
  cannot compute exact p-value with ties
2: In wilcox.test.default(xx, yy, paired = T) :
  cannot compute exact p-value with zeroes


    Comments & Feedback