Create random groups

Allows to assign cases to random groups (randomize cases).

Required input

  • Target variable: the variable which you want to contain the group numbers.
    • New variable: select this option and enter the name of a new variable (and a new column) in the data table.
    • Overwrite existing variable: select this option to select an existing variable or column in the data table. The corresponding column will be cleared before the random numbers are generated.
  • Data
    • Data: select a variable that contains a case identification (or any other variable that contains data for the cases to be randomized), and a possible filter.
    • Number of groups: the required number of groups, e.g. enter 2 to create 2 random groups..


The selected column in the data table is filled with a random group number.

See also


Go to Create random groups.