![]() |
CODEZName:
The CODEZ command is similar to the CODE command. However, the CODEZ command takes the order of the response variable into account. Specifically, CODEZ changes the value of the coded variable whenever the response variable changes value. The following example shows the difference between the CODE and CODEZ commands.
where <x> is the response variable; <y> is a variable where the coded values are saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET Y = CODEZ X SUBSET X > 0
LET X = DATA 1 1 1 2 2 2 3 3 3 1 1 1 1 2 2 3 3 3 3 4 LET Y = CODEZ X . SET WRITE DECIMALS 0 PRINT X YThe following results are generated. ------------------------------ X Y ------------------------------ 1 1 1 1 1 1 2 2 2 2 2 2 3 3 3 3 3 3 1 4 1 4 1 4 1 4 2 5 2 5 3 6 3 6 3 6 3 6 4 7
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 07/06/2016 |