About the SPSS Compute Variable Function
Sometimes you may have a data set that doesn’t give you the specific statistic you need. For example, you may have two counts for debt from credit cards and “other”, but you are more interested in the total debt. Or, you may want to know the average score for a particular set of variables. SPSS has a built in calculator that you can access in the Transform meu. SPSS Compute Variable works just like a mini calculator within the SPSS windows. It will add, subtract, find averages, and perform a whole host of other arithmetic functions. Once SPSS has calculated the result, it will return those results in a new column at the end of the existing data. Here’s how to use the compute variables function.
Watch the video for two examples (addition and finding the mean):
Step 1: Click “Transform”, then click “Compute Variable”.
Step 2: Give your new (target) variable name. This can be anything you like, but make sure to adhere to SPSS naming conventions for variables.
Step 3: Type in your request. For example, let’s say you wanted to add two variables:
- Move one variable over to the “Numeric Expression” box.
- Press the addition button (+) on the calculator.
- Move the second variable over to “Numeric Expression” box.
Step 4: Click OK.
Step 5: Close the execution window by clicking the “x” in the top right.
Note: If the OK button is greyed out (an easy mistake to make), make sure that you have specified a Target Variable name in the top left. Unlike entering data into Data View, SPSS won’t create a variable name (like “Default”) with the compute option. You must type in a name yourself for the program to run.
Stephanie Glen. "SPSS Compute Variable" From StatisticsHowTo.com: Elementary Statistics for the rest of us! https://www.statisticshowto.com/spss-compute-variable/
Need help with a homework or test question? With Chegg Study, you can get step-by-step solutions to your questions from an expert in the field. Your first 30 minutes with a Chegg tutor is free!
Comments? Need to post a correction? Please post a comment on our Facebook page.