Creating and Editing Data |
Adding Variables |
You can add a new variable by selecting Edit Variables New Variable from the main menu. Alternatively, you can right-click anywhere in the variable heading row. The New Variable dialog box appears. (See Figure 3.5.)
The New Variable dialog box enables you to define the variable properties. The following list describes each element in the dialog box.
specifies the name of the new variable. This must be a valid SAS variable name. This means the name must satisfy the following conditions:
must be at most 32 characters
must begin with an English letter or underscore
cannot contain blanks
cannot contain special characters other than an underscore
specifies the label for the variable.
specifies the type of variable: numeric or character.
specifies the variable’s measure level. The measure level determines the way a variable is used in graphs and analyses. A character variable is always nominal. For numeric variables, you can choose from two measure levels:
The variable contains values that vary across a continuous range. For example, a variable that measures temperature would likely be an interval variable.
The variable contains a discrete set of values. For example, a variable that indicates gender would be a nominal variable.
specifies the SAS format for the variable. For many formats you also need to specify values for the W (width) and D (decimal) boxes that are associated with the format. For more information about formats, see the SAS Language Reference: Dictionary.
specifies the SAS informat for the variable. For many informats you also need to specify values for the W (width) and D (decimal) boxes that are associated with the format. For more information about informats, see the SAS Language Reference: Dictionary.
Note:You can type the name of a format into the Format or Informat box, even if the name does not appear in the list.
Copyright © SAS Institute, Inc. All Rights Reserved.