Sabtu, 22 Maret 2008

SPSS Windows and Files

Lesson 1:

SPSS Windows and Files


In a typical session with SPSS, you are likely to work with three kinds of windows and have the opportunity to save the contents of each. The Data Editor Window, which is the first window you encounter, is used to define and enter your data and to perform statistical procedures. The results of the statistical tests appear in the Output Window. The Syntax Window can be used to keep a record of the operations that you perform on your data. This window will automatically open when you click a Paste function. So, for example, when you select certain cases for analysis or transform your data or compute a correlation, clicking the Paste function will store a record of what was performed (in command language). Beyond serving as a log for your operations, it is possible to run commands from the Syntax window; we will not discuss the syntax window in this tutorial; to find out how to do this, you can read through the Help commands.

You can save any of the windows. To save a window, make that particular window active. You can activate a window by using the Window menu. Once you have activated the desired window, click on File and then Save. The contents of each of these windows can also be printed by activating a window and clicking on the Printer icon (or you can open the File menu and then click on Print).

SPSS automatically adds a three-letter suffix to the end of the file name (".sav" for data editor files, ".spo" for output files, and ".sps" for syntax files). Thus, with a particular data set, it is probably wise to use a single name for the prefix of all three files and let the suffix distinguish among the different file types.

Basic information on these files is summarized below.

Windows

File Suffix
Function
Editor
.sav

Used to define, enter, and edit your data and to run statistical tests

Output
.spo

Contains the results of the statistical procedures

Syntax
.sps

This window is activated when you click on the Paste function and records a record of the operations that are "pasted." Although this is beyond the goals of these lessons, you may want to know that SPSS commands can actually be run from this window.

Lesson 2:

Entering Data, Computing Descriptive Statistics, Transforming and Selecting Your Data


The first step in working with SPSS is to enter your data and to create an SPSS data file. Although we will assume in this lesson that you are typing in your data for the first time, you should be aware that SPSS can also read already established data files from other programs such as Excel and Lotus 1-2-3.

When you first open up SPSS for Windows, you will be prompted to make a decision about running the tutorial, typing in new data, opening up an existing file, etc. Because you will be creating a new datafile, click on Type in data and then click OK. This should bring you to the initial screen which is the data editor.

Initial SPSS Data Editor Screen

Key Point

The key to typing in your data is to realize that the data from each case or participant must be typed on a separate line. So, for example, if you were interested in analyzing the five test scores of the 20 students in a class, you would use one line (with five grade scores on each line) for each of the 20 students. If you collected six characteristics (e.g., average family income, average number of children, . . .) for 80 countries, you would use one line for each of the 80 countries (with the six characteristics on each line).

Example

Let's take a concrete example. Assume that you are interested in developing a profile of people who use a soup kitchen in your city. To do this you collected the following information from a random sample of 50 users of the soup kitchen.

Person

Gender

Age

Number of Siblings
Health Score
Personality Score
Activity Score

1

Male

76

0

16.64

15

-4

2

Female

28

3

60.83

22

4

3

Male

39

0

44.25

18

2

4

Male

47

1

49.13

36

0

5

Female

56

0

30.67

25

-1

6

Female

61

0

29.37

20

-3

. . .







50

Male

59

0

35.92

31

2

Other Points to Keep in Mind

As you type in your data, you will need to do each of the following.

  1. Create a separate line for each case, which in this particular example is each person.
  2. Create a column for each variable of interest. In this example, we will use seven columns, one for each of the following variables (person, gender, age, number of siblings, health score, personality score, activity score). Note that it may not be essential to create a column for a person identification number, but we will do so simply to help us keep track of the data.
  3. Develop a numerical code for the gender variable. In this case, we will assign the value of 1 to females and the value of 2 to males.

Creating the Data File

In this section, we will describe the step-by-step procedure for creating your data file.

Step 1. Notice on the bottom left hand corner of the screen that you can access either the Data View or Variable View windows. To view one window or the other, simply click on it. For now, in establishing the variables and their characteristics, you should work in the Variable View window.

Variable View Window

Step 2. In the space for Name, type the desired variable name, which can be no more than 8 characters in length. The first character must be alphabetic; the remaining characters can be alphabetic and/or numeric, and no spaces can appear in the name. So, in this case, let's type "person."

Step 3. Next press the Tab key and you will notice that SPSS assigns default values to all of the settings. You should go through the relevant column for that particular variable. Clicking on a column will often expose a shaded area. You can click on this to pursue your options.

Below we have listed the functions of the columns and the default values.

Change Settings
Default Value

Type -- allows you to define the type of variable

numeric

Width -- total number of characters

8

Decimals -- number of characters beyond the decimal point

2

Label -- allows you to list a more extensive label for your variable. Eight character variable names are difficult to remember, and we recommend that you always exercise the option of listing a more descriptive label.

none

Value -- allows you to provide labels for the various levels of a variable

none

Missing Values -- enables you to designate certain scores as missing.

none

Columns --allows you to change the maximum number of characters in a column.

8

Align -- allows you to determine the alignment of your column

right

Measure -- allows you to determine the kind of scale for that particular variable

scale

In this example, because there are no decimal points in our person variable, click on the gray portion following Numeric and change the Decimal Places to 0. Also, click on Label and type in a label like "participant number" in the Variable Label slot. Note that we could have exercised other options such as modifying the column width and whether the numbers appear left-justified, right-justified, or centered.

Step 4. Now, you should set up the next variable. Click on line 2 of the Name column, on the next var column and type "gender". Because we have decided to use the codes of 1 and 2 to represent females and males, respectively, you can click on Decimals to change the decimal places to 0 (Note that you could have done this also from the Type column). Next, click on Label to provide a label for your variable--for example, you might type "gender of the participants." In this case, because we have specified numeric codes for the different values for our variable and we are likely to forget these over time, we should specify Values. In the field for Value, type a "1," and in the field for Label, type a label such as "females." Then create the label of "males" for a value "2." At this point, your window should look like the one below.

Current Variable View Window

Step 5. You should now define each of the remaining four variables. After you do this, click on the Data View window (lower left hand corner). You should see all of the variable names that you have entered like in the figure below.

Data File (Data View)

Step 6. Now, type in the data for the first six persons in our data sheet. Start by clicking in the left-most column of the first line and type the person's number (i.e., "1"), then, press the Tab Key or the right arrow key and type the first person's gender (i.e., "2"). Continue to do this until the data are typed in. Below we have listed a copy of the data file that we created.

Data file Containing the First Six Lines of the Data

Step 7. When you are satisfied with your data file, you should save it. Click on File and Save and type in a file name (e.g., "soupkit"). Note that SPSS automatically adds the ". sav" suffix to your file name. This is the SPSS suffix that is used to designate data files.

Computing Means and Standard Deviations

Once you have typed in your data, performing statistical procedures is relatively simple. To give you a sense of how to do so, as well as to expose you to some of the powerful SPSS tools for analyzing data, we will take you through several examples. In the first example, we will compute the mean and standard deviations for each of the variables from our soup kitchen study. In the second, we will do this separately for males and females. Finally, in a third example, we will compute a new variable that is a composite of the Health Activity and Personality Scores and compute the mean and standard deviation for this measure.

Computing the Mean and Standard Deviation for All Scores

Step 1. Click on Analyze, then Descriptive Statistics, then Descriptives.

Step 2. Highlight each of the variables for which you are interested in computing descriptive statistics (e.g., Age, Number of Siblings, Health Score, Personality Score, and Activity Score) and move them into the Variable(s) column. Note that you can move all of these variables over at one time by clicking and dragging over the items that you want to select.

Step 3. Click on Options and select the desired statistics. At minimum, you should select the Mean and Std. deviation. Now, click on Continue and then OK.

Step 4. Your output should look like that below. You may have fewer or more statistics depending on your selection in the Options menu. Note that the variable labels appear on your printout.

Output from the Analysis

Step 5. If you would like a hard copy of this output, you can print it by clicking on the print icon on the tool bar. Also, you can save the output by clicking on the disk icon. Note that SPSS automatically adds the ".spo" suffix to your output file name.

Computing Means and Standard Deviations for Males and Females Separately

Step 1. From the output screen, you cannot get to all of the options that you might be interested in. If the option that you are interested in is not available, click on Window, and then SPSS Data Editor to return to the Data Editor window. You will need to do this to do the following exercises.

Step 2. First click on Data and then Split File. This allows you to split the file according to a particular variable and conduct separate analyses for each level of the variable.

Step 3. Next you should select Organize output by groups and move Gender from the variable list to the Groups Based on list. When you have done this, click on OK.

Step 4. Now, click on Analyze, Descriptive Statistics, and Descriptives. Select the desired variable(s) and Options.

Step 5. Note in your output that two sets of data summaries are presented--one for females and one for males.

Computing a New Variable and Then Performing Descriptive Statistics

Assume that in addition to our interest in calculating the means and standard deviations for the collected variables, we wish to compute a composite score that roughly represents some overall measure of physical and mental health. Specifically, assume that we wish to compute the mean and standard deviation for a new variable called overall health that represents the average of each person's Health Score and Personality Score. You can do this by performing the following steps.

Step 1. Click on Transform and then Compute. This should produce the screen shown below.

Compute Variable Screen

Step 2. Type the name of the variable that you wish to create (in this case, we will name it "ohealth") in the Target Variable field. Now, you need to type in the computation that you wish to have performed in the Numeric Expression field. You can use all the operations listed on the bottom of this screen, and it is important to realize that operations within parentheses are performed first. Thus, if we wish to compute the mean of the Health and Personality Scores, we need to add these together before we divide by 2. To do so, simply type (or move over) variable names for the Health and Personality Scores and enclose these within parentheses. Next, click on the / button (or type it-- this is the symbol for division) and follow this with the number "2." Your target variable and your numeric expression fields might look like the following:

Target Variable

Numeric Expression

ohealth =

(health + personal)/2

Step 3. Now you should click on the Type&Label field. This will enable you to create a longer label for your variable and modify the type and width of the variable. Once you have done this, press Continue. Then press OK.

Step 4. Once you have done this, notice that the new variable appears in your data file. Now you are ready to calculate the mean and standard deviation for this new variable by using the procedures outlined above.

Another Example to Help You Practice Creating a Data File for a Data Set

If you would like further practice creating a data file and computing descriptive statistics, work your way through the following example. Assume that you have conducted an experiment to determine if newborn infants prefer patterned or plain stimuli. In the study, 10 infants were presented with both plain and patterned figures. The amount of time spent in looking at each type of stimulus was measured. In addition, the race of the infants and the age (in days) were recorded. The data sheet for this experiment appears below.

Participant
Race
Age
Time Viewing Patterned Figure
Time Viewing Plain Figure

1

Am. Indian

3

15

7

2

Asian

7

13

8

3

White

4

17

9

4

White

6

10

11

5

Afr. Amer.

6

14

7

6

Hispanic

5

16

9

7

White

3

9

7

8

White

4

14

12

9

Asian

7

21

6

10

Afr. Amer.

7

13

9

Below is one possible way to create your data file. Note that you have to create a numeric code for the race variable and in this case we used 1 = American Indian, 2 = Asian, 3 = African American, 4 = Hispanic, and 5 = White. Once you have typed the data file, compare it with the one below. Then, try to compute means and standard deviations for the time viewing the patterned figure and the time viewing the plain figure variables. The results should look like those in the output file below.

Data File for the Infant Viewing Experiment

Data File for the Data

Output File for the Infant Viewing Experiment

Ouput File for the Data

Lesson 3:

Computing a T-Test for Between-Subjects Designs

Purpose

This test is used to examine the effects of one independent variable on one or more dependent variables and is restricted to comparisons of two conditions or groups (two levels of the independent variable). The results of this test enable you to determine if two means differ significantly. Two basic experimental designs, between-subjects and within-subjects designs, can be analyzed with a t-test. In this lesson, we will describe how to analyze the results of between-subjects designs. It is important to distinguish between these two types of designs because they require different versions of the t-test. (For those of you who are familiar with statistics and SPSS, the Independent Samples T-Test is used with between-subjects designs and the Paired Samples T-Test is used with within-subjects designs.)

A two-group between-subjects design is one in which participants have been randomly assigned to the two levels of the independent variable. In this design, each participant is assigned to only one group, and consequently, the two groups are independent of one another. For example, assume that you are interested in studying the effects of two types of drugs (X, Y) on reaction time. If you randomly assign some participants to the Drug X group and other participants to the Drug Y group, then you are using a between-subjects design. (In a within-subjects design, all participants would receive both levels of the drug.)

An Example: Parental Involvement Experiment

Assume that you studied the effects of parental involvement (independent variable) on students' grades (dependent variable). Half of the students in a third grade class were randomly assigned to the parental involvement group. The teacher contacted the parents of these children throughout the year and told them about the educational objectives of the class. Further, the teacher gave the parents specific methods for encouraging their children's educational activities. The other half of the students in the class were assigned to the no-parental involvement group. The scores on the first test were tabulated for all of the children, and these are presented below.

Data Sheet for Parental Involvement Experiment

Student
Parental Involvement Condition
Test 1

01

Involvement

78.6

02

Involvement

64.9

03

Involvement

100.0

04

Involvement

83.7

05

Involvement

94.0

06

Involvement

78.2

07

Involvement

76.9

08

Involvement

82.0

09

No involvement

81.0

10

No involvement

69.5

11

No involvement

73.8

12

No involvement

66.7

13

No involvement

54.8

14

No involvement

69.3

15

No involvement

73.5

16

No involvement

79.4

Creating Your Data File: Key Point

There is a key point to keep in mind when creating a data file for an independent samples t-test. That is, that you must create a column for your independent variable condition. In this case, that is the parental involvement condition, and you should create a numeric code that allows SPSS to know the parental involvement condition that the score is in. So, the first part of your data file might look like the one below, with three variables--one for student number, one for parental involvement condition (using a code of "1" for involvement and "2" for no involvement), and score on Test 1. Remember, that in creating the data file, you should create a variable Label for each variable and Value label for the parental involvement variable. Your variable view file should look something like the one below.

Variable View File for the Parental Involvement Experiment

Computing the t-test for the Parental Involvement Experiment

Step 1. Click on Analyze, then Compare Means, then Independent Samples T-Test.

Step 2. Now, move the dependent variable (in this case, labeled "test1") into the Test Variable field.

Step 3. Move your independent variable (in this case, "involve") into the Grouping Variable field. You should be aware that Grouping Variable stands for your independent variable.

Step 4. You will notice that there are question marks in the parentheses following your independent variable in the Grouping Variable field. This is because you need to define the particular groups that you want to compare. To do so, click on Define Groups, and indicate the numeric values that each group represents. In this case, you will want to put a "1" in the field labeled Group 1 and a "2" in the field labeled Group 2. Once you have done this, click on Continue. Your independent-samples t-test screen should look like that below.

Independent Samples t-test Figure

Step 5. Now click on OK to run the t-test. You may also want to click on Paste in order to create a record of what you have done.

Output from the t-test Procedure

As you can see below, the output from a t-test procedure is relatively straightforward.

Output from Independent Samples t-test

  1. The first table lists the number of participants (N), mean, standard deviation, and standard error of the mean for both of your groups. Notice that the value labels are printed as well as the variable labels for your variables.
  2. The second table initially presents you with an F-test (Levene's test for equality of variances) that evaluates the basic assumption of the t-test that the variances of the two groups are approximately equal (homogeneity of variance). If the F value reported here is very high and the significance level is very low--usually lower than .05 or .01), then the assumption of homogeneity of variance has been violated. If this is the case, you should use the t-test in the lower half of the table, whereas if you have not violated the homogeneity assumption, you should use the t-test in the upper half of the table.
  3. In this particular case, you can see that we have not violated the homogeneity assumption, and we should use the t of 2.356, degrees of freedom of 14, and the significance level of .034. Thus, our data show that parental involvement has a significant effect on grades, t(14) = 2.356, p < .05.

Further Practice: Extending the Parental Involvement Experiment

Assume that the course had three tests and you wished to examine the effects of parental involvement on all three tests as well as a final term average. So, to do this, assume that the test score you already have in your data file is the score from the first test. Add the Test 2 and Test 3 scores (shown below in the data file) for each of the 16 students. Once you have done this, try to get SPSS to perform four t-tests--one for each of the three term grades and one for the final grade average. (Note that you can get SPSS to calculate the term average with the Transform Compute menu.)

Datafile with the Addtion of Tests 2 and 3

If you have problems working through this example, you should look at the steps below.

Step 1. To create a new variable that represents the average of all three tests, click on Transform, then Compute. Type in the name of the variable that you wish to create (e.g., "average") in the Target Variable field. In the Numeric Expression field, type (or click on the appropriate characters) the expression that represents the average. In this case, you might type the following expression

Target Variable

Numeric Expression

average

(test1 + test2 + test3)/3

Note that the three test scores are included within parentheses. This is necessary because SPSS first performs operations that are within parentheses, and that we want to add all the numbers before dividing. Make sure that you also create a label for your new variable. Once you have created the proper expression, click on OK, and this should take you to the SPSS data editor where you should see a new column that represents the average of the three test scores.

Step 2. Now click on Statistics, then Compare Means, then Independent Samples t-test. You should then move the four dependent variables (test1, test2, test3, average) into the Test Variable field. Next, move the independent variable (i.e., involve) into the Grouping Variable field. Next, click on Define Groups and indicate the two levels of your involve variable. When you are finished, click on OK. The first portion of your output should look like that below.

Output for the Average Variable

Lesson 4:

Analysis of Variance for One-Independent Variable Designs

Purpose

This lesson describes how to compute the analysis of variance for between-subjects designs that contain only one independent variable. This analysis is used to determine if two or more group means differ significantly. In the case of two-group designs, it yields the same probability level as the T-Test procedure. An F ratio is the statistic that is calculated and a significant F indicates that at least two-group means differ.

An Example: Preparation Courses and Scholastic Aptitude Test (SAT) Performance

As an educational researcher, assume that you conducted an experiment to test whether preparation courses (independent variable) affect Scholastic Aptitude Test (SAT) performance (dependent variable). Specifically, 5 high school juniors (normally, you would use many more students but we are using only 5 for purposes of demonstration) were randomly assigned to each of three study conditions:

  1. 0 hours of coursework preparation.
  2. 20 hours of coursework preparation
  3. 40 hours of coursework preparation

After all the coursework was completed, all 15 students were given the SAT and their scores on the verbal and math sections are listed below.

Student
Study Group (hours)
Verbal SAT Score
Math SAT Score

1

0

350

500

2

0

480

520

3

0

395

450

4

0

440

510

5

0

385

470

6

20

500

560

7

20

490

540

8

20

560

580

9

20

495

590

10

20

495

550

11

40

550

610

12

40

590

630

13

40

580

620

14

40

550

590

15

40

620

580

You should now create a data file that represents these data. Remember that you need to put each participant's data on one line and that you need to create a variable for the study group. You might create a data file that looks like the one below. You will also need to create a numeric code for your independent variable. In this case, we can assign 1 to 0 hours of coursework, 2 to 20 hours of coursework, and 3 to 40 hours of coursework.

Variable View File for the SAT Experiment

Data File for the SAT Experiment

Performing the Analysis

There are several ways to compute the analysis of variance with SPSS. We will use a procedure called One-Way ANOVA.

Step 1. Click on Analyze, then Compare Means, then One-Way ANOVA.

Step 2. Move the dependent measure that you wish to analyze into the Dependent List field. Let's analyze the data for the verbal SAT and math SAT, so move both "verbsat" and "mathsat" into the field. Next, you should move the independent variable into the Factor field. In our case, this is the "studygrp" variable. Now click on Options and select Descriptive statistics. When you have done this, click Continue and then on OK.

Step 3. You may also want to compute a total SAT score (using the Transform and Compute menu) and then perform an analysis of variance on this total score.

Examining the Output

You will notice that SPSS provides you with several types of information in the output for the analysis of variance.

ANOVA Output

  1. First, you are presented with the F statistic for each analysis that you requested. In this case, you requested one analysis of variance for the verbal SAT measure and one for the math SAT measure. If your F is large and your significance level is low (usually less than .05 or .01), then you can conclude that your results were not due to chance. In this case, course preparation had a significant influence on verbal SAT scores, F (2, 12) = 24.90, p < .05. Note that another name for the Mean Square Within Groups is the mean square of the Error Term.
  2. Because we asked for descriptive statisics, the mean and number of valid participants in each condition is presented.

Creating Tables for Your Data

If you want SPSS to list descriptive information about your groups in tabular form, you can do this through the Tables command. Assume that we would like to have the mean, standard deviation, and standard error of the mean for verbal scores for each of our three groups.

Step 1. Click on Analyze, then Custom Tables, then Basic Tables.

Step 2. Move the dependent variable measure ("verbsat") into the Summaries field.

Step 3. Move the independent variable ("studygrp") into the Subgroups Down field.

Step 4. Click on Statistics and Add the statistics that you would like to see. For this example, calculate the mean, standard deviation, and standard error of the mean (S. E. Mean), and any other statistics that you would like to see.

Step 5. Click on Continue and then OK. The statistics should then appear in a table like the one shown below. Note that the value labels appear in your output (that is, if you specify the value label when entering the variables of data).

Showing a Table

Creating a Simple Bar Graph

Data are often best communicated in a visual form. SPSS has a variety of graphs that you can use to display your data. You can make a simple bar graph of your data from this experiment by following the steps listed below.

Step 1. Click on Graphs, then Bar.

Step 2. In the Bar Charts menu, click on Simple and then Define.

Step 3. In the Define Simple Bar menu, first select Other summary function (this enables you to plot the means of your groups) and then select your dependent variable measure ("verbsat") and move it into the Variable field. The default will be to compute the mean for that variable, but you can modify this (to select the median, mode, or other summary statistics) by clicking Change Summary. Given that we wish to calculate the mean, we will leave it as is.

Step 4. Now move the independent variable ("studygrp") into the Category Axis field.

Step 5. If you wish to create a title for your figure, click on Titles, and type a title.

Step 6. When you are ready, click on OK, and compare your figure with the one below.

Initial Figure

Step 7. SPSS uses default options in creating your graph and you can modify it by double clicking on your graph. This will access the SPSS Chart Editor. In the graph below, you can see that the title does not fit with the default font size. Also, you may want to change the font, size, and location of the X- and Y-axis labels. With a bit of editing, you can get it to look like the one below.

Modified Figure

Step 8. You should note that when you are in the SPSS Chart Editor, you can save the settings that you created in your graph by clicking on File and then Save Chart Template. Doing this will save your preferences for the various graph options (e.g., font size, centering vs. left or right justification of labels) and will enable you to apply these to future graphs.

Lesson 5:

Computing a Correlation and a Scatterplot

Purpose

This lesson explains how to obtain Pearson Product Moment Correlation Coefficients (r's), for pairs of variables, and tests the significance of these coefficients. This enables you to find the degree of relationship between any two continuous variables in your study. We will also describe how you can graph the relationships between your variables (i.e., create scatterplots).

An Example: Dormitory Survey

Suppose that you have collected questionnaire responses to five questions concerning dormitory conditions from 10 college freshmen. (Normally you would like to have a larger sample, but the small sample in this case is useful for illustration.) The questionnaire assesses the satisfaction with noise, furniture, study area, safety, and privacy. Assume that you have also assessed the students' family income level, and you would like to test the hypothesis that satisfaction with the college living environment is correlated with wealth (family income).

The questionnaire contains five questions about satisfaction with the various aspects of the dormitory "noise," "furniture," "space," "study," "safety," and "privacy." These are answered on a 5-point Likert-type scale (very dissatisfied to very satisfied), which are coded as 1 to 5. The data sheet for this study is shown below.

Student
Income
Noise
Furniture
Study Area
Safety
Privacy

01

19

5

5

4

5

5

02

39

3

3

5

5

4

03

55

2

1

2

2

2

04

25

5

3

4

4

5

05

75

1

2

2

1

2

06

95

1

1

1

1

1

07

47

3

2

4

3

3

08

28

4

4

5

4

4

09

120

2

2

1

1

1

10

35

3

4

5

4

4

In creating your data file, you will need to create a column for each of the different variables. In the interest of keeping track of what the variables represent, you should also type a very descriptive label for each of your variables. Try typing your SPSS data file and then compare it with the one below.

Data File for Dorm Study

Computing the Pearson Product Moment Correlation for the Dormitory Survey

Step 1. Click on Analyze, then Correlate, then Bivariate.

Step 2. Move the variables that you wish to have correlated into the Variables field.

Step 3. If you wish to print the means and standard deviations, then click on Options and select the desired statistics. Then click on Continue and then OK.

Examining the Output

Below is the major portion of the output from the dormitory survey correlations. You will see that the first table contains the descriptive statistics concerning your variables. The correlational statistics are presented in the second table. Note that SPSS computes all possible correlations among the variables that you specified. The correlations are listed in the first third of the table, the significance levels of the correlations are listed in the second third of the table, and the valid number of pairs of scores are listed in the bottom portion of the table.

Output File for the Dorm Study

Creating a Scatterplot for Pairs of Variables

A scatterplot (also called scattergrams or scatter diagrams) is a two-dimensional graphic representation of the relationship between two variables. This type of graph helps you evaluate the nature and degree of relationship between your variables.

Step 1. To create a scatterplot of your data, let us say between the variables of income and noise, click on Graphs and then Scatter.

Step 2. In the Scatterplot menu, click on Simple and then Define.

Step 3. Now move the variables into the appropriate axes. In this case, you might want to move the noise variable into the Y-Axis field and the income variable into the X-Axis field. When you have done this, click on OK, and as shown below, this should produce a scatterplot of the relationship between your two variables. As you can see, this graph tends to show declining satisfaction for those who have higher family incomes.

Initial Scatterplot Graph

Step 4. As you can see, the SPSS default options for labeling this graph are not ideal. You can modify your graph by double clicking on it, and this accesses the SPSS Chart Editor. Once you are in the SPSS Chart Editor, you can center the label on the Y axis and can capitalize the first letters of the words by double clicking on the label and then modifying the appropriate items. You can make the title fit by clicking on the title and then on Format and then on Text. With a little work, your graph can look like the one below.

Modified Scatterplot Graph

Step 5. You should realize that you can save the template for your preferred options by selecting File and then Save Chart Template. This will enable you to apply these options to future graphs.

Lesson 6:

Computing an Analysis of Variance for a Factorial Design
(two or more independent variables)


To use this program, all of your IVs need to be manipulated between subjects.

Step 1. Create your data file. Remember that you will need a column for each IV as well as a column for each dependent variable or score. For example, assume that you tested the effects of different types of violence (cartoon, real-action) and different amounts of violence (10 minutes, 20 minutes) on the aggressive behavior of children. This is a 2 X 2 factorial design in which 10 of the children watched 10 minutes of cartoon violence, 10 children watched 20 minutes of cartoon violence, 10 children watched 10 minutes of real-action violence, and 10 children watched 20 minutes of real-action violence. After being exposed to their respective films, all of the children were allowed to play with other children and the number of aggressive acts were counted.

When setting up the SPSS file for this study, you would need to have at least 3 columns: (1) one column for the first independent variable-let's use "viotype" for violence type (this would be coded with a 1 or 2, depending on whether the child received cartoon or real action violence), (2) one column for the second independent variable-let's say "vioamt" for violence amount (this would be coded with a 1 or 2, depending on whether the child watched 10 or 20 minutes of violence), and (3) one column for the dependent variable-let's use "agress" for number of aggressive acts (coded by the actual number of aggressive acts).

Step 2. Click on Analyze, then General Lineas Model and then Univariate.

Step 3. Move your dependent measure into the Dependent Variable window.

Step 4. Now move your independent variables into the Fixed Factor(s) window.

Step 5. Click on Options and move all of the items from the left hand box (Factor(s) and Factor Interactions) to the box on the right (Display Means For). This will cause SPSS to list the means for all of your effects.

Step 6. Click on Continue and then OK.

SPSS Windows and Files

Lesson 7:

Computing the Analysis of Variance for a Mixed-Factorial Design


This chapter will describe now to compute an analysis of variance for a design that contains two or more independent variables and at least one of the independent variables is varied within-subjects (i.e., is a repeated-measures independent variable).

As an example, assume that you conducted an experiment in which you were interested in the extent to which visual distraction affects younger and older people's learning and remembering. To do this, you obtained a group of younger adults and a separate group of older adults and had them learn under three conditions (eyes closed, eyes open looking at a blank field, eyes open looking at a distracting field of pictures). This is a 2 (age) x 3 (distraction condition) mixed factorial design. The scores on the data sheet below represent the number of words recalled out of ten under each distraction condition.

Data Sheet for Aging and Distraction Experiment.

Age Condition

Closed Eyes
Simple Distraction
Complex Distraction




Younger

8
5
3

Younger

7
6
6

Younger

8
7
6

Younger

7
5
4

Older

6
5
2

Older

5
5
4

Older

5
4
3

Older

6
3
2

Creating Your Data File:

Remember, in creating your data file, at minimum you need to create a column for your between-subjects independent variable (age condition) and a column for each of the levels of your within-subjects (for repeated-measures) variable. Thus, in this case, you will need a column for the age condition, closed-eye score, the simple distraction score, and the complex-distraction score. Thus, you may want to create one like the data file below.

Data File for the Distraction Experiment

Computing the Analysis of Variance for the Distraction Experiment

Step 1. Click on Analyze, then General Linear Model, then Repeated Measures.

Step 2. You will need to create a name for your within-subjects factor. In the box labeled Within-subject Factor Name, type a name to represent the distraction condition. For example, you may want to type in "distcond." Next, type in the number of levels for this independent variable -- in this case, it is "3." Once this is done, click on the Add box because we have only one within-subjects independent variable, we can now move on and Define the levels of the independent variable. So click now on the Define box.

Step 3. Now you have to define what variables will serve as levels 1, 2, and 3 of the independent variable of distraction condition. A reasonable way to do this would be to move the "closed" variable into the first position, the "simple" variable into the second position, and the "complex" variable into the third position.

Step 4. Now you should indicate your between-subjects independent variable. To do this, click on "agecond" and move it into the Between-Subjects Factor(s): box.

Step 5. Click on Options and move all of the items along the left-hand box (Factors and Factor Interactions:), into the right-hand box (Display Mean for:) This will cause SPSS to list the means for all of your effects.

Step 6. Click on Continue and then OK.

Examining the Output

The output from this analysis is rather complex. In most cases, all that you will need to do is to examine the "Tests of Within-Subjects Effects" and "Test of Between-Subjects Effects" boxes. As shown in the output below, these results indicate a reliable main effect of distraction condition, F(2,12) = 19.5, MSE = .778, p < .05, a main effect of age, F(1,6) = 15.78, MSE = 1.278, p < .05, and no reliable interaction between these two variables, F <>

Partial Output from Distraction Experiment

You can evaluate the direction of these effects by examining the means in the boxes at the end of the output. For example, you can see that younger people (M = 6.00) did better than older people (M = 4.17).

Name:*

Email Address:*

Feedback: