![]() |
CODE DEX 2-LEVELName:
If your factor variables are in original units of the data rather than classical units, you can use the CODE DEX 2-LEVEL command to convert them to classical units. In some cases, you may only want the minimum and maximum values (i.e., the "-1" and "+1" points). For example, for the dex interaction effects plot in the ten step analysis we need exactly two levels. This command is similar to the CODE DEX command. The distinction is that CODE DEX preserves the center points and expects a maximum of the 3 distinct values. The CODE DEX 2-LEVEL command will accept any number of levels, but only saves the minimum and maximum levels.
<SUBSET/EXCEPT/FOR qualification> where <x> is the factor variable; <y> is a variable where the coded values are saved; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
If you want to have variables in the original units for some purposes, you can save the data in original units before using the CODE DEX 2-LEVEL command. For example
LET X^J = CODE DEX 2-LEVEL Z^J
CODE DEX 2LEVEL DEX CODE 2LEVEL
read x1 24 36 24 36 24 36 24 36 30 30 end of data . set write decimals 0 let y1 = code dex x1 let y2 = code dex 2-level x1 print x1 y1 print y2The following output is returned ------------------------------ X1 Y1 ------------------------------ 24 -1 36 1 24 -1 36 1 24 -1 36 1 24 -1 36 1 30 0 30 0 --------------- Y2 --------------- -1 1 -1 1 -1 1 -1 1 | ||||||||||||
Privacy
Policy/Security Notice
NIST is an agency of the U.S. Commerce Department.
Date created: 10/30/2018 |