On 2013-05-30 04:20, Al Zou wrote:
I understand this might be a silly question, but I have problems
understanding the statistic term returned in most permutation packages.
for example:
x<-c(8,4,6)
y<-c(5,3,4)
res<-exactRankTests::perm.test(x,y,paired=TRUE)
1-sample Permutation Test
data: x and y
T = 6, p-value = 0.25
alternative hypothesis: true mu is not equal to 0
attributes(res)
$names
[1] "statistic" "p.value" "pointprob" "null.value" "alternative"
"method" "data.name"
$class
[1] "htest"
res$statistic
T
6
I cannot figure out what the T stands for. I understand it is "T statistic"
but it is not the t-score.
Can some one tell me what formula is used for the T statistic.
The formula is simple: T is the sum of the positive paired differences.
You could check Wikipedia for "permutation test". There must be plenty
of online info but I'm too lazy to check.
In general is there some way to look for what function is used to calculate
the statistics?
Just look at the code of perm.test.default (it's not complicated).
Type
perm.test.default
to see the code or get the package source and study the code.
Peter Ehlers
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.