介绍:代码再后面
WILCOXON procedure
Performs a Wilcoxon Matched-Pairs (Signed-Rank) test (S.J. Welham, N.M. Maclaren & H.R. Simpson).
Option
PRINT = string tokensOutput required (test, ranks): test gives the relevant test statistics, ranks prints out the signed ranks for the vector of differences; default test
Parameters
DATA = variatesVariates holding the differences between each pair of samples
RANKS = variatesSaves the signed ranks
STATISTIC = scalarsSaves each test statistic
PROBABILITY = scalarsSaves the probability for each test statistic
SIGN = scalarsScalar to indicate the sign of the total sum of each set of signed ranks: 1 if the sum is positive, 0 otherwise
Description
WILCOXON performs a Wilcoxon Matched-Pairs test on a variate holding differences between two paired samples. This is specified using the DATA parameter. The test statistic can be saved using the STATISTIC parameter. The probability can be saved using the PROBABILITY parameter; this is for a two-sided test i.e. no assumption is made about whether the differences should be positive or negative. The SIGN parameter can save an indicator of whether the total sum of signed ranks is positive (SIGN=1) or negative (SIGN=0), and the RANKS parameter can save a variate of the signed ranks of the differences (i.e. of DATA).
Output from the procedure is controlled by the PRINT option: test produces the relevant test statistics, and ranks prints the vector of signed ranks for the data.
Option: PRINT. Parameters: DATA, RANKS, STATISTIC, PROBABILITY, SIGN.
Method
The Wilcoxon Matched-Pairs test (often also called the Wilcoxon Signed-Ranks test) is a nonparametric test of location in the case of two related samples (e.g. a before-and-after study). The null hypothesis is that two samples arise from exactly the same distribution, with the alternative that the two underlying distributions differ only in location.
The test statistic WS is formed from the signed ranks of the differences between each pair of observations and is the smaller in absolute value out of:
1) the sum of positive signed-ranks of the sample, and
2) the sum of the negative signed-ranks.
In this procedure the method used for calculating the test statistic is:
WS = N×(N+1)/4 - modulus(total sum of signed ranks)/2
where N is the number of observations. The probability is calculated using the PRWILCOXON procedure.
For further information, see Siegel (1956) pages 75-83.
Action with RESTRICT
If the DATA variate is restricted, the test is calculated only using the units not excluded by the restriction.
Reference
Siegel, S. (1956). Nonparametric Statistics for the Behavioural Sciences. McGraw-Hill, New York.
See also
Procedure: PRWILCOXON, MANNWHITNEY, SIGNTEST, TTEST.
Commands for: Basic and nonparametric statistics.