RELATED Subcommand (NPTESTS command)
The RELATED
subcommand produces related-samples
nonparametric tests. The TEST
keyword is required,
all other keywords are optional. If RELATED
is specified
with none of the optional keywords, the following tests are performed
automatically:
- If two categorical fields are specified and they have only two values, McNemar's test is performed.
- If two continuous fields are specified, a Wilcoxon Matched-Pairs Signed-Rank test is performed.
- If more than two categorical fields are specified and they each have only two values, Cochran's test is performed.
- If more than two continuous fields are specified, Friedman's Two-Way Analysis of Variance by Ranks is performed.
- Otherwise, no tests are performed.
When fields of differing measurement level are specified, they are first separated by measurement level and then the appropriate test is applied to each group. For example, if you specify:
NPTESTS
/RELATED TEST(c1 n1 o1 c2 o2 n2 o3 c3 o4).
Where x1, x2, and x3 are continuous fields, a1 and a2 are nominal fields, and o1, o2, o3, and o4 are ordinal fields, then Friedman's test is applied to the continuous fields, McNemar's test is applied to the nominal fields, and no test is applied to the ordinal fields.
TEST Keyword
The TEST
keyword lists the fields that you want
to test.
- Specify one or more fields. Note that certain tests are not applicable
to fields of a particular measurement level; for example, the McNemar
test is only performed for categorical fields.
NPTESTS
automatically determines which tests are applicable to which fields. See the individual keyword descriptions for details.
[MCNEMAR( [SUCCESS={FIRST** }])]
{LIST(valuelist)}
The MCNEMAR
keyword produces a related samples
test of whether combinations of values between two dichotomous fields
are equally likely.
- A separate test is performed for all of the nominal fields and
for all of the ordinal fields specified on the
TEST
keyword. - The test specifications given on the
MCNEMAR
keyword apply to all tests performed. - If any test has more than two fields, or any field has more than two values, the test is not performed.
Example
NPTESTS /RELATED TEST(n1 n2 n3 o1 o2) MCNEMAR.
If n1, n2, n3 are nominal fields and o1 and o2 are ordinal fields, then no test is performed for the nominal fields and a test is performed for the ordinal fields so long as o1 and o2 each have only two values.
SUCCESS= FIRST|LIST(valuelist). The SUCCESS
keyword
specifies how "success" is defined for categorical fields.
-
FIRST
performs the test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on aRELATED
subcommand whereFIRST
is used will not be tested. This is the default. -
LIST
performs the test using the specified list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.
WILCOXON Keyword
The WILCOXON
keyword produces a related samples
test of whether the distribution of two paired fields in two related
samples is the same. The test takes into account the magnitude of
the differences between two paired fields.
- A single test is performed for all of the continuous and ordinal
fields specified on the
TEST
keyword. - If there are more than two continuous or ordinal fields, the test is not performed.
SIGN Keyword
The SIGN
keyword produces a related samples test
of whether the distribution of two paired fields in a two-related-samples
test is the same.
- A single test is performed for all of the continuous and ordinal
fields specified on the
TEST
keyword. - If there are more than two continuous or ordinal fields, the test is not performed.
MARGINAL_HOMOGENEITY Keyword
The MARGINAL_HOMOGENEITY
keyword produces a related
samples test of whether combinations of values between two paired
ordinal fields are equally likely. The marginal homogeneity test is
typically used in repeated measures situations. This test is an extension
of the McNemar test from binary response to multinomial response.
- A single test is performed for all of the ordinal fields specified
on the
TEST
keyword. - If there are more than two ordinal fields, the test is not performed.
HODGES_LEHMAN Keyword
The HODGES_LEHMAN
keyword produces a related samples
estimate and confidence interval for the median difference between
two paired fields.
- A single confidence interval is computed for all of the continuous
and ordinal fields specified on the
TEST
keyword. - If there are more than two continuous or ordinal fields, no confidence intervals are created.
[COCHRAN(
[SUCCESS={FIRST** }]
{LIST(valuelist)}
[COMPARE={PAIRWISE**}]
{STEPWISE }
{NONE }
)]
The COCHRAN
keyword produces a related samples
test of whether the distribution of values is the same for k related
dichotomous fields.
- A separate test is performed for all of the nominal fields and
for all of the ordinal fields specified on the
TEST
keyword. - The test specifications given on the
COCHRAN
keyword apply to all tests performed. - If any field has more than two values, the test is not performed.
Example
NPTESTS /RELATED TEST(n1 n2 n3 o1 o2) COCHRAN.
If n1, n2, n3 are nominal fields and o1 and o2 are ordinal fields, then a test is performed for the nominal fields and a test is performed for the ordinal fields so long as each field has only two values.
SUCCESS= FIRST|LIST(valuelist). The SUCCESS
keyword
specifies how "success" is defined for categorical fields.
-
FIRST
performs the test using the first value found in the sample to define "success". This option is only applicable to nominal or ordinal fields with only two values; all other categorical fields specified on aRELATED
subcommand whereFIRST
is used will not be tested. This is the default. -
LIST
performs the test using the specifed list of values to define "success". Specify a list of string or numeric values. The values in the list do not need to be present in the sample.
COMPARE= PAIRWISE| STEPWISE|NONE. Multiple comparisons. The COMPARE
keyword
controls how and whether multiple comparisons should be performed. PAIRWISE
produces
all pairwise multiple comparisons. STEPWISE
produces
stepwise stepdown comparisons. NONE
turns off multiple
comparisons. By default, all pairwise comparisons are produced.
FRIEDMAN Keyword
[FRIEDMAN([COMPARE={PAIRWISE**}])]
{STEPWISE }
{NONE }
The FRIEDMAN
subcommand produces a related samples
test of whether k related samples have been drawn from the
same population.
A single test is performed for all of the continuous and ordinal
fields specified on the TEST
keyword.
COMPARE= PAIRWISE| STEPWISE| NONE. Multiple comparisons. The COMPARE
keyword
controls how and whether multiple comparisons should be performed. PAIRWISE
produces
all pairwise multiple comparisons. STEPWISE
produces
stepwise stepdown comparisons. NONE
turns off multiple
comparisons. By default, all pairwise comparisons are produced.
KENDALL Keyword
[KENDALL([COMPARE={PAIRWISE**}])]
{STEPWISE }
{NONE }
The KENDALL
keyword produces a related samples
test of whether k related samples are from the same population.
Kendall's W is a measure of agreement among judges or raters,
where each case is one judge's rating of several items (fields).
A single test is performed for all of the continuous and ordinal
fields specified on the TEST
keyword.
COMPARE= PAIRWISE| STEPWISE| NONE. Multiple comparisons. The COMPARE
keyword
controls how and whether multiple comparisons should be performed. PAIRWISE
produces
all pairwise multiple comparisons. STEPWISE
produces
stepwise stepdown comparisons. NONE
turns off multiple
comparisons. By default, all pairwise comparisons are produced.