CREATE MULTIPLE DICHOTOMY FROM CONDITIONS command
See Crunch Automation basics for more information.
The CREATE MULTIPLE DICHOTOMY FROM CONDITIONS command allows you to create a multiple response variable indicating the logical condition and optionally indicate the base for the evaluation, either by indicating the VALID rows or MISSING rows as a logical expression.
It is possible to use a global VALID/MISSING expression for all conditions or enter them individually, but both cannot be used simultaneously.
Each response statement must contain a LABEL and an optional ALIAS:
CREATE MULTIPLE DICHOTOMY FROM CONDITIONS
MAPPING
SELECT condition [(MISSING|VALID) condition] LABEL "label" [ALIAS alias],
....
SELECT condition [MISSING|VALID) condition] LABEL "label" [ALIAS alias]
END
[MISSING|VALID) condition]
AS alias
[TITLE "string"]
[DESCRIPTION "string"]
[NOTES "string"];
Example
CREATE MULTIPLE DICHOTOMY FROM CONDITIONS
MAPPING
SELECT A=1 VALID is_valid(A) LABEL "First" ALIAS s1,
SELECT B=1 OR C = 1 MISSING B != 1 LABEL "Second",
SELECT D != 1 AND (C != 1) LABEL "Third" ALIAS s2
END
AS my_mr_cond;
CREATE MULTIPLE DICHOTOMY FROM CONDITIONS
MAPPING
SELECT A=1 LABEL "First" ALIAS s1,
SELECT B=1 OR C = 1 LABEL "Second",
SELECT D != 1 AND (C != 1) LABEL "Third" ALIAS s2
END
MISSING is_missing(asked) OR asked = 1
AS my_mr_cond;