CREATE CATEGORICAL SCALE command
See Crunch Automation basics for more information.
The CREATE CATEGORICAL SCALE command allows you to create new categorical variables that have consecutive scale-like categories.
This command can operate over multiple variables at a time, as long as they are only of categorical or numeric type.
The number of values should match in quantity to the number of labels, none of which can be repeated.
CREATE CATEGORICAL SCALE alias, ..., alias
VALUES code, ..., code
LABELS label, ..., label
AS alias, ..., alias
[TITLE "string", ..., "string" | function()]
[DESCRIPTION "string", ..., "string" | function()]
[NOTES "string", ..., "string" | function()];
Example
CREATE CATEGORICAL SCALE my_num1, my_cat
VALUES 1...10
LABELS "label1"..."label10"
AS
my_scale1, my_scale2;
CREATE CATEGORICAL SCALE my_num1, my_cat
VALUES -2, -1, 0, 1, 2
LABELS "Hate", "Dislike", "Neutral", "like", "Love it!"
AS
my_scale1, my_scale2;