IBM SPSS Tutorial – Part 04 – Data Transformations

When you open SPSS, the version number is shown below the words ‘IBM SPSS Statistics’.

It is a good practice to save all the outputs in a single output file (the file with .spv extension).

For the data entry of nominal/ordinal variables, click the cell in which you want to enter the value. Choose a value label from the drop-down list. The value is entered, and the value label is displayed in the cell. If you type a character that is not allowed by the defined variable type, the character is not entered.

To open the syntax editor, click File > New > Syntax. Generate a sample descriptive statistics. Notice that there is also syntax printed above the descriptive statistics in the output. The syntax provides a text-based map of the command we just ran using drop-down menus. If we had executed this syntax in a Syntax Editor window instead, we would get the exact same results as we did using the drop-down menu.

You can turn off the syntax by using the option Edit -> Options -> Viewer

In the file uploaded in the previous tutorial, you might have noticed some issues in the resultant SPSS file (Example 1).

Date. A numeric variable whose values are displayed in one of several calendar-date or clock-time formats. Select a format from the list. You can enter dates with slashes, hyphens, periods, commas, or blank spaces as delimiters. You can only choose from the selected formats, custom option is not available.
https://www.ibm.com/support/pages/node/247659

All SPSS date-time variables, regardless of whether they’re a date or a duration, are stored in SPSS as the number of seconds since October 14, 1582. When we understand that date values are really numbers of seconds, it becomes very easy to add, say, one day to date values. Note that one day is 60 (seconds) * 60 (minutes) * 24 (hours) = 86400 seconds. Calculate age based on two dates (Example 2).

Scientific notation. A numeric variable whose values are displayed with an embedded E and a signed power-of-10 exponent. The Data Editor accepts numeric values for such variables with or without an exponent. The exponent can be preceded by E or D with an optional sign or by the sign alone–for example, 123, 1.23E2, 1.23D2, 1.23E+2, and 1.23+2.
https://www.javatpoint.com/scientific-notation-in-spss

If you have selected a subset of cases but have not discarded unselected cases, unselected cases are marked in the Data Editor with a diagonal line (slash) through the row number. Practice Example 3 and also see this link.

The Recode into Same Variables dialog box allows you to reassign the values of existing variables or collapse ranges of existing values into new values. For example, you could collapse salaries into salary range categories. You can recode numeric and string variables. If you select multiple variables, they must all be the same type. You cannot recode numeric and string variables together. Practice with Example 4.

The Recode into Different Variables dialog box allows you to reassign the values of existing variables or collapse ranges of existing values into new values for a new variable. For example, you could collapse salaries into a new variable containing salary-range categories. You can recode numeric and string variables. You can recode numeric variables into string variables and vice versa. If you select multiple variables, they must all be the same type. You cannot recode numeric and string variables together. Practice with Example 4.

Leave a Reply

Your email address will not be published.