You can access the Figure 4.2) by clicking a column heading and selecting → from the main menu. Alternatively, right-clicking a variable heading (see Figure 4.1) selects that variable and displays the same menu.
menu (shown inYou can use the to do the following:
menuchange properties of existing variables
create a new variable
change the set of variables that are displayed in the data table
change the set of selected and unselected variables
set the role of an existing variable. You can assign three default roles:
The values of the variable are used to label the markers in a plot. Only the markers that you have clicked are labeled.
The values of the variable are used as the frequency of occurrence for each observation. If you assign a variable to a Frequency role, then that variable is automatically added to dialog boxes for analyses and graphs that support a frequency variable.
The values of the variable are used as weights for each observation. If you assign a variable to a Weight role, then that variable is automatically added to dialog boxes for analyses and graphs that support a weight variable.
All roles are optional; you do not need to specify any roles. A variable can play multiple roles, but there can be at most one variable assigned to each role.
The following list describes each item on the Variables menu.
displays the Variable Properties dialog box, described in the section Adding Variables in Chapter 3: Creating and Editing Data. The dialog box enables you to change most properties for the selected variable. However, you cannot change the type (character
or numeric) of an existing variable.
changes the measure level of the selected numeric variable.
A character variable cannot be interval.
makes the selected variable the label variable for plots. Only one variable can have this role.
makes the selected variable the frequency variable for analyses and plots that support a frequency variable.
Only a numeric variable can have a Frequency role.
makes the selected variable the weight variable for analyses and plots that support a weight variable.
Only a numeric variable can have a Weight role.
specifies how nominal variables are ordered.
This affects the way that a variable is sorted and the order of categories in plots. If a variable has missing values, they
are always ordered first. See the Ordering Categories of a Nominal Variable section in Chapter 11 for further details. The submenu is shown in Figure 4.3.
You can order a variable in the following ways:
specifies that categories be arranged in ASCII order by their unformatted values. In ASCII order, numerals precede uppercase letters, which precede lowercase letters.
specifies that categories be arranged according to the descending frequency count of formatted values in each category.
specifies that categories be arranged in ASCII order by their formatted values.
specifies that categories be arranged according to the data order of formatted values. The data order is determined by traversing the values of a variable, starting from the first observation. The first (nonmissing) value you encounter is ordered first, the next unique (nonmissing) value of the variable is ordered second, and so on. Sorting the data table does not affect this ordering; the ordering is based on the original sequence of observations.
specifies that categories be arranged according to the descending frequency count of unformatted values in each category.
specifies that categories be arranged according to the data order of unformatted values. Sorting the data table does not affect this ordering; the ordering is based on the original sequence of observations.
specifies that this variable be ordered by calling the DataObject.SetVarValueOrder method. See the SAS/IML Studio online Help for details about this method.
displays the Sort dialog box. The Sort dialog box is described in the section Sorting Observations.
displays the New Variable dialog box to create a new variable as described in the section Adding Variables in Chapter 3: Creating and Editing Data. (See Figure 3.5.)
deletes the selected variables.
toggles whether the column heading displays the names of variables or displays their labels.
hides the selected variables. The variables can be displayed at a later time by selecting . Hidden variables cannot be selected.
displays all variables, including variables that were hidden.
changes the set of selected variables. Deselected variables become selected, and selected variables become deselected.
creates a new character variable called _OBSTAT_
that encodes the current state of each observation.
The values of the _OBSTAT_
variable are described in the next section.