J-T Subcommand (NPAR TESTS command)

NPAR TESTS /J-T=varlist BY variable(value1,value2)

J-T (alias JONCKHEERE-TERPSTRA) performs the Jonckheere-Terpstra test, which tests whether k independent samples that are defined by a grouping variable are from the same population. This test is particularly powerful when the k populations have a natural ordering. The output shows the number of levels in the grouping variable; the total number of cases; observed, standardized, mean, and standard deviation of the test statistic; the two-tailed asymptotic significance; and, if a /METHOD subcommand is specified, one-tailed and two-tailed exact or Monte Carlo probabilities. This subcommand is available only if Sampling and Testing is installed.

Syntax

  • The minimum specification is a test variable, the keyword BY, a grouping variable, and a pair of values in parentheses.
  • Every value in the range defined by the pair of values for the grouping variable forms a group.
  • If the / METHOD subcommand is specified, and the number of populations, k, is greater than 5, the p value is estimated by using the Monte Carlo sampling method. The exact p value is not available when k exceeds 5.

Operations

  • Cases from the k groups are ranked in a single series, and the rank sum for each group is computed. A test statistic is calculated for each variable that is specified before BY.
  • The Jonckheere-Terpstra statistic has approximately a normal distribution.
  • Cases with values other than values in the range that is specified for the grouping variable are excluded.
  • The direction of a one-tailed inference is indicated by the sign of the standardized test statistic.

Example

NPAR TESTS /J-T=V1 BY V2(0,4)
  /METHOD=EXACT.
  • This example performs the Jonckheere-Terpstra test for groups that are defined by values 0 through 4 of V2. The exact p values are calculated.