Name: David Cleary
About David: David joined SPSS Inc. as an education consultant for SPSS Statistics and Clementine. Previously, he worked as a statistician and college professor. He received a Ph.D. in Child Development from Auburn University. In his free time, David enjoys spending time with his family, reading, and playing tennis and golf.
Using statistical functions to compute new variables
When computing a new variable in SPSS Statistics (previously known as SPSS for Windows®), be sure to use statistical functions to account for missing data that might be present in one or all of the variables that are included in the calculation.
For example, perhaps you'd like to compute a composite variable for Education using the average of education data across four variables. As shown below, one approach is to drag each of the four variables into the Numeric Expression box, separate each variable by an addition sign, and then divide them by four. In this example, the Compute Variable window looks like this:
There's a problem with this method of computing a new variable, however: if any of the four variables have missing data, they will not be included. You can resolve this dilemma by using the functions available in the Compute Variable window:
Next, go to the Numeric Expression box and place each variable within the parentheses for Mean. When you calculate the new variable, it will include all of the variables—even if there is missing data in each of the variables. In this example, the Compute Variable window looks like this:
The statistical functions make computing new variables easier, and they also have an important advantage over manual entry. For more information on using syntax within SPSS Statistics, please refer to the SPSS Statistics Command Syntax Reference that accompanies your software.
We offer SPSS courses at locations around the world.
Find a course in the location nearest to you.
Predictive Analytics
can make your organization
more
successful
Resources