|
JONCKHEERE TERPSTRAName:
The Kruskal-Wallis test is a nonparametric alternative to the one factor ANOVA. The Jonckheere Terpstra test is another nonparametric alernative. The distinction is that the Jonckheere-Terpstra test alternative is used when there is an expected rank order of the factor level effects. That is, given that there are k levels for the factor it tests the hypothesis
\( H_{a} = F_{1}(x) \ge F_{2}(x) \ge \ldots \ge F_{k}(x) \) Given k samples \( X_1, X_2, \dots , X_k \) of size \( n_1, n_2, \ldots , n_k \), the Jonckheere-Terpa test statistic is defined as
where \( p_{ij} \) is sum of the number of times \( X_i < X_j \). Dataplot computes the critical values for this test in two ways.
The Jonckheere-Terpstra test is an upper tailed test.
<SUBSET/EXCEPT/FOR qualification> where <y> is the response (= dependent) variable; <x> is the factor (= independent) variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
JONCKHEERE TERPSTRA Y X SUBSET X = 1 TO 4
The data does not need to be pre-sorted either within level or between levels.
If <value> is less than 100, it will be set to 100. If <value> is greater than 100,000, it will be set to 100,000. Permutation tests assume the observations are independent. However, no distributional assumptions are made about the response variable.
The full permutations are written to the file dpst2f.dat.
Higgins (2004), "Introduction to Modern Nonparameteric Statistics," Duxbury Press, chapter 3, p. 101. Knuth (1998), "The Art of Computer Programming: Volume 2 Seminumerical Algorithms, Third Edition", Section 3.4.2, Addison-Wesley. Knoble RANDPERM algorithm downloaded from: "http://coding.derkeiler.com/Archive/Fortran/comp.lang.fortran/ 2006-03/msg00748.html"
set random number generator fibbonacci congruential seed 26101 . . Read the data . read jonck.dat x y . . Perform the Jonckheere-Terpstra test . jonckheere terpstra test y xThe following output is generated
Jonckheere-Terpstra Permutation Test
(Critical Values Determined from Permutation Test)
Response Variable: Y
Group-ID Variable: X
H0: F1(x) = F2(x) = ... = Fk(x)
Ha: F1(x) >= F2(x) >= ... >= Fk(x)
Test:
Number of Permutation Samples: 4000
Statistic Value: 46.0000
Test CDF Value: 0.9885
Test P-Value: 0.0115
Conclusions (Upper 1-Tailed Test)
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Region (>=) Conclusion
------------------------------------------------------------
80.0% 46.0000 18.0000 REJECT
90.0% 46.0000 28.0000 REJECT
95.0% 46.0000 34.0000 REJECT
99.0% 46.0000 48.0000 ACCEPT
Jonckheere-Terpstra Test
(Critical Values Determined from Normal Approximation)
Response Variable: Y
Group-ID Variable: X
H0: F1(x) = F2(x) = ... = Fk(x)
Ha: F1(x) >= F2(x) >= ... >= Fk(x)
Test:
Number of Permutation Samples: 4000
Statistic Value: 46.0000
Adjusted Statistic Value: 2.1479
Test CDF Value: 0.9841
Test P-Value: 0.0159
Conclusions (Upper 1-Tailed Test)
------------------------------------------------------------
Null
Significance Adjusted Test Critical Hypothesis
Level Statistic Region (>=) Conclusion
------------------------------------------------------------
80.0% 2.1479 0.8416 REJECT
90.0% 2.1479 1.2816 REJECT
95.0% 2.1479 1.6449 REJECT
99.0% 2.1479 2.3263 ACCEPT
.
. Plot the results
.
title offset 7
title case asis
label case asis
y1label Count
x1label Jonckheere-Terpstra Permutations
let statval = round(statval,3)
let p95 = round(p95,3)
let pval = round(pvalue,3)
let statcdf = round(statcdf,3)
.
x2label color red
x2label JT of Original Sample: ^statval
x3label color blue
x3label 95 Percentile: ^P95
. xlimits -1.0 1.0
let niter = 4000
skip 1
read dpst1f.dat z
title Histogram of Jonckheere-Terpstra Test for ^niter Permutationscr() ...
(Pvalue: ^pval, CDF: ^statcdf)
.
histogram z
.
line color red
line dash
drawdsds statval 20 statval 90
line color blue
line dash
drawdsds p95 20 p95 90
Program 2:
set random number generator fibbonacci congruential seed 391631 . . Read the data . skip 25 read con326.dat y x . . Perform the Jonckheere-Terpstra test . jonckheere terpstra test y x
Jonckheere-Terpstra Permutation Test
(Critical Values Determined from Permutation Test)
Response Variable: Y
Group-ID Variable: X
H0: F1(x) = F2(x) = ... = Fk(x)
Ha: F1(x) >= F2(x) >= ... >= Fk(x)
Test:
Number of Permutation Samples: 4000
Statistic Value: 204.0000
Test CDF Value: 0.9993
Test P-Value: 0.0008
Conclusions (Upper 1-Tailed Test)
------------------------------------------------------------
Null
Significance Test Critical Hypothesis
Level Statistic Region (>=) Conclusion
------------------------------------------------------------
80.0% 204.0000 56.0000 REJECT
90.0% 204.0000 82.0000 REJECT
95.0% 204.0000 106.0000 REJECT
99.0% 204.0000 148.0000 REJECT
Jonckheere-Terpstra Test
(Critical Values Determined from Normal Approximation)
Response Variable: Y
Group-ID Variable: X
H0: F1(x) = F2(x) = ... = Fk(x)
Ha: F1(x) >= F2(x) >= ... >= Fk(x)
Test:
Number of Permutation Samples: 4000
Statistic Value: 204.0000
Adjusted Statistic Value: 3.4004
Test CDF Value: 0.9997
Test P-Value: 0.0003
Conclusions (Upper 1-Tailed Test)
------------------------------------------------------------
Null
Significance Adjusted Test Critical Hypothesis
Level Statistic Region (>=) Conclusion
------------------------------------------------------------
80.0% 3.4004 0.8416 REJECT
90.0% 3.4004 1.2816 REJECT
95.0% 3.4004 1.6449 REJECT
99.0% 3.4004 2.3263 REJECT
.
. Plot the results
.
title offset 7
title case asis
label case asis
y1label Count
x1label Jonckheere-Terpstra Permutations
let statval = round(statval,3)
let p95 = round(p95,3)
let pval = round(pvalue,3)
let statcdf = round(statcdf,3)
.
x2label color red
x2label JT of Original Sample: ^statval
x3label color blue
x3label 95 Percentile: ^P95
let niter = 4000
skip 1
read dpst1f.dat z
title Histogram of Jonckheere-Terpstra Test for ^niter Permutationscr() ...
(Pvalue: ^pval, CDF: ^statcdf)
.
histogram z
.
line color red
line dash
drawdsds statval 20 statval 90
line color blue
line dash
drawdsds p95 20 p95 90
Date created: 03/08/2024 |
Last updated: 03/08/2024 Please email comments on this WWW page to [email protected]. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||