RUNS Subcommand (NPAR TESTS command)

NPAR TESTS RUNS({MEAN  })=varlist
                {MEDIAN}
                {MODE  }
                {value }

RUNS tests whether the sequence of values of a dichotomized variable is random. The output includes a Run Test table, showing the test value (cut point that is used to dichotomize the variable tested), number of runs, number of cases that are below the cut point, number of cases that are greater than or equal to the cut point, and test statistic Z with its two-tailed probability for each variable.

Syntax

  • The minimum specification is a cut point in parentheses followed by a test variable.
  • The cut point can be specified by an exact value or one of the keywords MEAN, MEDIAN, or MODE.

Operations

  • All tested variables are treated as dichotomous: cases with values that are less than the cut point form one category, and cases with values that are greater than or equal to the cut point form the other category.
  • Test statistics are calculated for each specified variable.

Example

NPAR TESTS RUNS(MEDIAN)=V2 /RUNS(24.5)=V2 /RUNS(1)=V3.
  • This example performs three runs tests. The first test tests variable V2 by using the median as the cut point. The second test also tests V2 by using 24.5 as the cut point. The third test tests variable V3, with value 1 specified as the cut point.