Start learning with our library of video tutorials taught by experts. Get started

SPSS Statistics Essential Training

Computing new variables


From:

SPSS Statistics Essential Training

with Barton Poulson

Video: Computing new variables

When you enter or import data into SPSS, you may want to know a person's average score on a series of variables, but it's usually a good idea to bring in the raw data and not a summarized version. That way you can recode or modify from the original information. Also some procedures, such as calculating something called the internal reliability of a questionnaire, those procedures may require the complete raw data. Once you bring the data in though and recode it as necessary, you can then compute the average scores, or a maximum, or spread, or whatever interests you, using SPSS's extremely flexible Compute command.
Expand all | Collapse all
  1. 2m 58s
    1. Welcome
      1m 5s
    2. Using the exercise files
      40s
    3. Using a different version of the software
      1m 13s
  2. 19m 0s
    1. Taking a first look at the interface
      11m 49s
    2. Reading data from a spreadsheet
      7m 11s
  3. 21m 54s
    1. Creating bar charts for categorical variables
      7m 18s
    2. Creating pie charts for categorical variables
      2m 54s
    3. Creating histograms for quantitative variables
      5m 45s
    4. Creating box plots for quantitative variables
      5m 57s
  4. 33m 10s
    1. Recoding variables
      5m 33s
    2. Recoding with visual binning
      5m 33s
    3. Recoding by ranking cases
      5m 26s
    4. Computing new variables
      5m 37s
    5. Combining or excluding outliers
      5m 21s
    6. Transforming outliers
      5m 40s
  5. 28m 12s
    1. Selecting cases
      6m 44s
    2. Using the Split File command
      5m 12s
    3. Merging files
      5m 33s
    4. Using the Multiple Response command
      10m 43s
  6. 22m 14s
    1. Calculating frequencies
      8m 43s
    2. Calculating descriptives
      5m 31s
    3. Using the Explore command
      8m 0s
  7. 16m 3s
    1. Calculating inferential statistics for a single proportion
      6m 6s
    2. Calculating inferential statistics for a single mean
      5m 39s
    3. Calculating inferential statistics for a single categorical variable
      4m 18s
  8. 30m 43s
    1. Creating clustered bar charts
      7m 10s
    2. Creating scatterplots
      5m 8s
    3. Creating time series
      3m 24s
    4. Creating simple bar charts of group means
      4m 17s
    5. Creating population pyramids
      3m 0s
    6. Creating simple boxplots for groups
      3m 3s
    7. Creating side-by-side boxplots
      4m 41s
  9. 45m 28s
    1. Calculating correlations
      8m 17s
    2. Computing a bivariate regression
      6m 27s
    3. Creating crosstabs for categorical variables
      6m 34s
    4. Comparing means with the Means procedure
      6m 33s
    5. Comparing means with the t-test
      6m 4s
    6. Comparing means with a one-way ANOVA
      6m 30s
    7. Comparing paired means
      5m 3s
  10. 24m 30s
    1. Creating clustered bar charts for frequencies
      6m 34s
    2. Creating clustered bar charts for means
      3m 45s
    3. Creating scatterplots by group
      4m 13s
    4. Creating 3-D scatterplots
      4m 25s
    5. Creating scatterplot matrices
      5m 33s
  11. 30m 57s
    1. Using Automatic Linear Models
      11m 52s
    2. Calculating multiple regression
      9m 3s
    3. Comparing means with a two-factor ANOVA
      10m 2s
  12. 29m 29s
    1. Formatting descriptive statistics
      6m 1s
    2. Formatting correlations
      7m 49s
    3. Formatting regression
      10m 19s
    4. Exporting charts and tables
      5m 20s
  13. 51s
    1. What's next
      51s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
SPSS Statistics Essential Training
5h 5m Beginner Aug 17, 2011

Viewers: in countries Watching now:

In this course, author Barton Poulson takes a practical, visual, and non-mathematical approach to the basics of statistical concepts and data analysis in SPSS, the statistical package for business, government, research, and academic organization. From importing spreadsheets to creating regression models to exporting presentation graphics, this course covers all the basics, with an emphasis on clarity, interpretation, communicability, and application.

Topics include:
  • Importing and entering data
  • Creating descriptive charts
  • Modifying and selecting cases
  • Calculating descriptive and inferential statistics
  • Modeling associations with correlations, contingency tables, and multiple regression
  • Formatting and exporting tables and charts
Subjects:
Business Data Analysis
Software:
SPSS
Author:
Barton Poulson

Computing new variables

When you enter or import data into SPSS, you may want to know a person's average score on a series of variables, but it's usually a good idea to bring in the raw data and not a summarized version. That way you can recode or modify from the original information. Also some procedures, such as calculating something called the internal reliability of a questionnaire, those procedures may require the complete raw data. Once you bring the data in though and recode it as necessary, you can then compute the average scores, or a maximum, or spread, or whatever interests you, using SPSS's extremely flexible Compute command.

I am going to do this by using the GSS data set that asks people if whether in the last year they had seen a classical music or opera performance, or they had attended a live performance of pop music, or they had attended a dance performance in last year, seen a live drama, or even just read a novel or poem or a play in the last year, and then saw art. And so we have here a series of sort of cultural indicators, and one thing we might want to do is add up how many of these things people say they've done to get a rough index on cultural involvement.

One way to do this with Compute variable is to simply add these up, and I can do that even though it says the words yes and no here. If I come back up to the button Value Labels and click on it, you can see that I have zeros and ones underneath, and the nice thing about that, and this is why we prefer the indicator variables, is I can simply add them up. I can simply get a sum for these variables and find out how many of these people have done. I'm going to first create a space for this variable. Now you normally don't need to do this.

It would simply add the variable at end. But I'd like the variable to be right here next to the other ones, so what I am going to do is I'm going to come to the end of that list and now at Happy, I am going to right click on it and insert a new variable. And I am going to double-click on that variable to edit it. It will bring up Variable view, and click right here under Name, backspace, and I'll change name to ArtTotal. I can leave the width at 8.

I'll change the decimals to 0, because these are all integer values, and I'll add a label, Art Forms Participated. I'll also change this over here to a Scale variable, and I will change it to be both an Input and a Target variable, so I can use it either way by saying both. Come back to the Data view, and I'll save the data. And now what I am going to do is I am going to create a command that will add up these 1, 2, 3, 4, 5, 6 variables and create a score here, so it'll go from zero to six.

Go to Transform to Compute, and it asks me for the TargetVariable. Now I've already created it, so I can simply write here ArtTotal. And then it's going to ask for a numerical expression that's a formula. Now you can get very sophisticated formulas in SPSS. For instance, I can get an exponent, or I can do the modulus. In fact in a couple of videos from now, I am going to show you how to use the logarithmic function as a way of dealing with outliers.

But all I really want right now is a very, very simple one. All I need is the sum. I'll go to Function group. Then I come down here in the Functions and Special Variables list till I find Sum, and if double-click on that, it adds to the numeric expression and then asks, what is it that I'm going to be adding up? I can back up and remove those, and then I can select the variables that I want to be included in the sum. I want this variable, SawClassical, and I can add each one of these with a comma between them.

I can go like this, and I can add another one. But because these variables are sequential in the data file, I can actually use a shortcut expression. I can just list the first one, and then I can put space and write the word "to" and then the last one is "SawArt." And once I have that, it says to add up the scores on all these variables. Because they are 0/1 indicator variables, the sum will simply be how many of these did people say they've done in the last year. If I want to, I can make it so that it only calculates it for particular cases, for instance for just man or for people who are over particular age. I don't need to do that so I am going to leave it alone. I'll just press OK.

And it asks me if I want to change the existing variable. Now, there's nothing there because I created a blank variable, so I can just click OK. It writes down that it did COMPUTE, that the new variable ArtTotal is equal to the sum of SawClassical to SawArt, and then execute to actually create that. When I go to the data set, I see a new variable right here with scores from 0, there is a 5, I don't know if we have any 6s, I can check that out. But now I've created a new variable that combines the results of these various cultural indicators to give me a single variable that I can use in further analyses, a way of correlating with other variables and trying to get an idea of who might be more or less involved in arts and cultural activities.

And so the Compute command is a very flexible one, a great way of reforming the data to get it in the manner that can be most useful for your particular analyses.

There are currently no FAQs about SPSS Statistics Essential Training.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed SPSS Statistics Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked