http://uit.unt.edu/research

Data Science and Analytics

UITHelp Desk | Training | About Us | Publications | DSA Home

Please participate in the DSA Client Feedback Survey.

Return to the SPSS Short Course

MODULE 5

Compute Function

The compute function is often useful when conducting Regression analysis because it provides an easy way to create centered terms and interaction terms for testing moderation.

Task: Compute a simple average of Recall1 and Recall2.

Start off by importing the ExampleData001.sav into the Data Editor window of PASW / SPSS (from this point forward referred to as simply SPSS).

To use the Compute function, simply go to "Transform", "Compute Variable..."

You should now see the "Compute Variable" dialog box. Type AVG_recall into the "Target Variable:" box and then enter the equation by typing it or using the symbols on the calculator key pad in the dialog box and selecting and moving both variables with the arrow button. When typing in an equation, pay particularly close attention to where spaces are necessary. Then click "Paste".

After clicking "Paste" you should see the following syntax which can be highlighted and submitted to create the new variable. Use the big green arrow (triangle) to submit after highlighting the syntax. Syntax is shown here because, it is often just as easy to write the syntax for a compute function as it would be to navigate through the menu system to produce it.

 

Return to the SPSS Short Course

UNT home page

Contact Information

Jon Starkweather, PhD

Jonathan.Starkweather@unt.edu

940-565-4066

Richard Herrington, PhD

Richard.Herrington@unt.edu

940-565-2140

Please participate in the DSA Client Feedback Survey.

Last updated: 2018.11.12 by Jon Starkweather.

UITHelp Desk | Training | About Us | Publications | DSA Home