Previous Page | Next Page

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.)

Figure 3.5 The New Variable Dialog Box
The New Variable Dialog Box

The New Variable dialog box enables you to define the variable properties. The following list describes each element in the dialog box.

Name


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

Label


specifies the label for the variable.

Type


specifies the type of variable: numeric or character.

Measure Level


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:

Interval

The variable contains values that vary across a continuous range. For example, a variable that measures temperature would likely be an interval variable.

Nominal

The variable contains a discrete set of values. For example, a variable that indicates gender would be a nominal variable.

Format


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.

Informat


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.

Previous Page | Next Page | Top of Page