Previous Page  Next Page 
Data Windows

Variables

The column headings in a data window give information on each variable, including the name, label, default roles, and measurement level. The number of variables appears in the upper left corner of the data window.

dat04.gif (9554 bytes)

Figure 31.4: Variables

A variable's default role assigns the role a variable plays by default in graphs and analyses. Click in the upper left portion of the variable header to display a pop-up menu of variable roles.

[menu]
Figure 31.5: Variable Roles Pop-up Menu

You can assign four default roles:

Group
enables you to process your data by groups. You can use multiple group variables to process your data by groups for each unique combination of values of the group variables.

Label
labels observations in scatter plots, rotating plots, and box plots.

Frequency
represents the frequency of occurrence for other values in each observation.

Weight
supplies weights for each observation.

You can assign Freq, Weight, and Label roles to only one variable at a time. You can assign the Group role to more than one variable. The order in which you assign the group role determines the order in which the variables are used to define groups.

A variable's measurement level determines the way it is treated in graphs and analyses.


Figure 31.6: Measurement Levels Pop-up Menu

You can assign two measurement levels:

Interval
contains values that vary across a continuous range. For example, a variable measuring temperature would likely be an interval variable. Numeric variables default to the interval measurement level but can be changed to nominal.

Nominal
contains a discrete set of values. For example, a variable indicating gender would be a nominal variable. Character variables can use only the nominal measurement level.

Up to 250 variable measurement levels can be stored with a data set.

Default roles and measurement levels are displayed in the column headings above the variable names. The default role appears at the upper left of the column heading and the measurement level appears at the upper right. If a variable has more than one default role, then only the first character of each role appears.

In Figure 31.4, NAME has a label default role, and TEAM has a group default role. NAME and TEAM both have a nominal measurement level, while the remaining variables have an interval measurement level.


Note
Up to 250 measurement levels can be stored in the SAS data set. You can use the data pop-up menu to create new variables or to change the default role or measurement level of existing variables.

For more information, see the section "Data Menu" later in this chapter.

You can use the Edit:Variables menu to create new variables that are transformations of existing variables. See Chapter 20, "Transforming Variables," for more information.

Previous Page  Next Page  Top of Page

Copyright © 2007 by SAS Institute Inc., Cary, NC, USA. All rights reserved.