|
COX STUART TESTName:
Given a set of ordered observations X1, X2, ..., Xn, let
c = n/2 if n even
= (n+1)/2 if n odd
Then pair the data as X1,X1+c, X2,X2+c, ..., Xn-c,Xn. The Cox-Stuart test is then simply a sign test applied to these paired data. Syntax 1:
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword that specifies either a lower tailed or an upper tailed test; <y> is a response variable; and where the <SUBSET/EXCEPT/FOR qualification> is optional. If neither LOWER TAILED or UPPER TAILED is specified, the Cox and Stuart test will return the results for the two-tailed case, the lower tailed case, and the upper tailed case. If LOWER TAILED is specified, then only the results for the lower tailed case will be printed. If UPPER TAILED is specified, then only the results for the upper tailed case will be printed.
<SUBSET/EXCEPT/FOR qualification> where <LOWER TAILED/UPPER TAILED> is an optional keyword that specifies either a lower tailed or an upper tailed test; <y1> ... <yk> is a list of 1 to 30 response variables; and where the <SUBSET/EXCEPT/FOR qualification> is optional. This syntax will perform a Cox-Stuart test for each of the response variables. For example,
is equivalent to
COX STUART TEST Y2 COX STUART TEST Y3 COX STUART TEST Y4
COX STUART TEST Y1 Y2 Y3 COX STUART TEST Y1 TO Y5 LOWER TAILED COX STUART TEST Y UPPER TAILED COX STUART TEST Y
The paired data can also be analyzed using other techniques for comparing two response variables (e.g., t-test, bihistogram, quantile-quantile plot).
. Purpose: Test the Cox Stuart Trend Test
. Sample data from example 2 on page 171 of Conover.
.
let y = data 45.25 45.83 41.77 36.26 45.37 52.25 35.37 57.16 35.37 ...
58.32 41.05 33.72 45.73 37.90 41.72 36.07 49.83 36.24 ...
39.90
.
set write decimals 4
cox stuart test y
The following output is generated.
Cox Stuart Test for Trend
(Compare Observations < Midpoint to Those > Midpoint)
Response Variable: Y
H0: There is No Trend
Ha: There is a Trend
Summary Statistics:
Number of Observations 19
Number of Observations After Matching: 9
Summary Statistics for Points Below Midpoint:
Sample Mean: 43.8477
Sample Median: 45.2500
Sample Standard Deviation: 7.5965
Sample Median Absolute Deviation 7.0000
Summary Statistics for Points Above Midpoint:
Sample Mean: 40.2399
Sample Median: 39.8999
Sample Standard Deviation: 5.0799
Sample Median Absolute Deviation 3.6599
Test:
Number of Positive Differences: 5
Number of Negative Differences: 4
Number of Ties: 0
CDF Value for Positive Values: 0.7460
CDF Value for Negative Values: 0.5000
P-Value (2-tailed test): 1.0000
P-Value (lower-tailed test): 0.7460
P-Value (upper-tailed test): 0.5000
Two-Tailed Test
H0: P(+) = P(-); Ha: P(+) <> P(-)
---------------------------------------------------------------------------
Lower Upper Null
Significance Test Critical Critical Hypothesis
Level Statistic Value (<) Value (>) Conclusion
---------------------------------------------------------------------------
50.0% 5 3 6 ACCEPT
80.0% 5 3 6 ACCEPT
90.0% 5 2 7 ACCEPT
95.0% 5 2 7 ACCEPT
99.0% 5 1 8 ACCEPT
99.9% 5 0 9 ACCEPT
Date created: 09/22/2011 |
Last updated: 12/11/2023 Please email comments on this WWW page to [email protected]. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||