IBM SPSS Statistics Tutorial – Part 02 – Variable View

When you open the SPSS software, you will notice the Data Editor divided into two tabs: Data View and Variable View.

Click on the Variable View tab. Unlike Excel, where you can directly type column headings and enter data below them, in SPSS, you need to declare variables in the Variable View first and then enter data in the Data View.

The Variable View offers various options, which are explained below:

Name: Each variable name must be unique; duplication is not allowed. The first character must be a letter. Subsequent characters can be any combination of letters, numbers, and nonpunctuation characters. Variable names can be up to 64 bytes long. Variable names cannot contain spaces. Variable names ending with a period should be avoided, since the period may be interpreted as a command terminator. Variable names ending in underscores should be avoided, since such names may conflict with names of variables automatically created by commands and procedures. When long variable names need to wrap onto multiple lines in output, lines are broken at underscores, periods, and points where content changes from lower case to upper case.

Type: Variable Type specifies the data type for each variable. Some of the available data types are as follows:
Numeric. A variable whose values are numbers.
Date. A numeric variable whose values are displayed in one of several calendar-date or clock-time formats. 
String. A variable whose values are not numeric and therefore are not used in calculations. The values can contain any characters up to the defined length.

Width: The number of characters that can be stored in the variable.

Decimals: For numeric formats, you can enter values with any number of decimal positions (up to 16), and the entire value is stored internally. The Data View displays only the defined number of decimal places and rounds values with more decimals. However, the complete value is used in all computations.

Label: You can assign descriptive variable labels up to 256 characters (128 characters in double-byte languages). Variable labels can contain spaces and reserved characters that are not allowed in variable names.

Values: You can assign descriptive value labels for each value of a variable. This process is particularly useful if your data file uses numeric codes to represent non-numeric categories (for example, codes of 1 and 2 for male and female).

Missing: Missing Values defines specified data values as user-missing. For example, you might want to distinguish between data that are missing because a respondent refused to answer and data that are missing because the question didn’t apply to that respondent. Data values that are specified as user-missing are flagged for special treatment and are excluded from most calculations. You can enter up to three discrete (individual) missing values, a range of missing values, or a range plus one discrete value.

Columns: You can specify a number of characters for the column width.

Align: Alignment controls the display of data values and/or value labels in Data View. The default alignment is right for numeric variables and left for string variables. This setting affects only the display in Data View.

Measure: You can specify the level of measurement as scale (numeric data on an interval or ratio scale), ordinal, or nominal. Nominal and ordinal data can be either string (alphanumeric) or numeric.
Nominal. A variable can be treated as nominal when its values represent categories with no intrinsic ranking (for example, the department of the company in which an employee works). Examples of nominal variables include region, zip code, and religious affiliation.
Ordinal. A variable can be treated as ordinal when its values represent categories with some intrinsic ranking (for example, levels of service satisfaction from highly dissatisfied to highly satisfied). Examples of ordinal variables include attitude scores representing degree of satisfaction or confidence and preference rating scores. For ordinal string variables, the alphabetic order of string values is assumed to reflect the true order of the categories. For example, for a string variable with the values of lowmediumhigh, the order of the categories is interpreted as highlowmedium, which is not the correct order. In general, it is more reliable to use numeric codes to represent ordinal data.
Scale. A variable can be treated as scale (continuous) when its values represent ordered categories with a meaningful metric, so that distance comparisons between values are appropriate. Examples of scale variables include age in years and income in thousands of dollars.

Role: Some dialogs support predefined roles that can be used to pre-select variables for analysis. When you open one of these dialogs, variables that meet the role requirements will be automatically displayed in the destination list(s). By default, all variables are assigned the Input role. Available roles are:
Input. The variable will be used as an input (e.g., predictor, independent variable).
Target. The variable will be used as an output or target (e.g., dependent variable).
Both. The variable will be used as both input and output.
None. The variable has no role assignment.
Partition. The variable will be used to partition the data into separate samples for training, testing, and validation.
Split. Included for round-trip compatibility

Leave a Reply

Your email address will not be published.