CREATE MULTIPLE DICHOTOMY EXTEND command
See Crunch Automation basics for more information.
The CREATE MULTIPLE DICHOTOMY EXTEND command allows you to create a new multiple response variable based on an existing one by adding new logical columns to it.
Requirements
Expressions MUST evaluate to a boolean condition. The following are example expressions you can use:
- is_none_of_the_above(array)
- combine_responses(alias, ..., alias)
- all_valid(array)
- all_missing(array)
- any_missing(array)
CREATE MULTIPLE DICHOTOMY EXTEND alias
WITH
boolean_expression "label" [ALIAS alias] ((POSITION int|FIRST|LAST)|(AFTER|BEFORE alias)),
...
boolean_expression "label" [ALIAS alias] ((POSITION int|FIRST|LAST)|(AFTER|BEFORE alias)),
END
AS alias
[TITLE "string"]
[DESCRIPTION "string"]
[NOTES "string"];
Example
CREATE MULTIPLE DICHOTOMY EXTEND mr
WITH
is_none_of_the_above(mr) "Any Valid" POSITION 2,
combine_responses(A, B) "Net AB" ALIAS subvar_ab POSITION FIRST,
any_missing(mr) "Any Missing" AFTER B
END
AS my_extended_mr;