Close
SciStat
 

Groups from quantiles

Description

Categorizes a continuous variable by generating a new categorical variable with group numbers based on the quantiles of the continuous variable.

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 the continuous variable and a possible filter.
    • Number of groups: the required number of groups, e.g. enter 4 to create groups based on the quartiles of the selected continuous variable.

Results

The selected column in the data table is filled with the group numbers (e.g. 1, 2, 3 and 4) corresponding with the quantiles of the continuous variable.

See also

Link

Go to Groups from quantiles.