- Data Analysis with IBM SPSS Statistics
- Kenneth Stehlik Barry Anthony J. Babinec
- 367字
- 2025-04-04 18:20:23
Variable properties
Once you successfully read a source data file, the next steps are to establish the variable properties for each variable and then do some data checking.
Here is an example of a portion of a Variable View with variable properties:

The IBM SPSS Statistics Data Editor window presents two views accessible via tabs in the lower left of the window: Data View and Variable View. The Data View shows a flat file view of the data with observations in the rows and variables in the column. The Variable View shows the variables row-wise along with the variable properties. In the Variable View, there are as many rows as there are variables. At the time of writing this, there are 11 default variable properties, plus you can define and add custom attributes.
The variable properties are as follows:
- Name: Each variable must have a unique variable name
- Type: The type or format of the variable, for example, numeric, string, or date
- Width: The total number of columns of the variable values
- Decimals: The number of decimal positions of the variable values
- Label: The variable label for the variable
- Values: Value labels for the values of the variable
- Missing: User-defined values that should be flagged as missing
- Columns: The display width of the variable column in the Data View
- Align: The alignment of the values in the Data View columns
- Measure: The level of measurement of the variable
- Role: The role of the variable in analysis when used in certain IBM SPSS Statistics procedures
The Variable View provides an interactive interface to define and edit variable properties. You can work directly in the Variable View interface to add or edit properties or you can use copy and paste to copy properties from one variable to another. The copy and paste operation even works across Data Editor windows, so you can copy properties from a variable in one window to a variable in another window. You can also name new variables and define properties for the newly created variables before collecting data. One shortcoming of the Variable View interface is that you cannot generate syntax from this window. However, see the next section to define variable properties.