+ All Categories
Home > Documents > Creating a File in SPSS - balkinresearchmethods.com · Creating a File in SPSS Create an Excel file...

Creating a File in SPSS - balkinresearchmethods.com · Creating a File in SPSS Create an Excel file...

Date post: 19-Jul-2018
Category:
Upload: dangxuyen
View: 229 times
Download: 0 times
Share this document with a friend
86
Richard S. Balkin, Ph.D., 2004 1 Creating a File in SPSS Create an Excel file that looks like the one below. Save the Excel program to your computer. Now, open up SPSS. SPSS will ask you if you want to open an existing program. Click OK.
Transcript

Richard S. Balkin, Ph.D., 2004

1

Creating a File in SPSS Create an Excel file that looks like the one below.

Save the Excel program to your computer. Now, open up SPSS. SPSS will ask you if you

want to open an existing program. Click OK.

Richard S. Balkin, Ph.D., 2004

2

Now, use the top bar that says, Look in: to find where your data is located. Make sure Files of type: says Excel.

Richard S. Balkin, Ph.D., 2004

3

I called my Excel program anova example. Open it by double-clicking (DC).

Richard S. Balkin, Ph.D., 2004

4

You will see this box:

Click OK

Richard S. Balkin, Ph.D., 2004

5

Once you have opened the file, it should look like this:

If you have not already done so, click Edit-Options-Viewer and then click the box that says “Display commands in the log.” Now you are ready to run a one-way ANOVA. The first thing we want to do is analyze our model assumptions. Consider what you would look for to evaluate independence.

Richard S. Balkin, Ph.D., 2004

6

One-way ANOVA To assess for normality, we will use the Explore command on SPSS.

Richard S. Balkin, Ph.D., 2004

7

You want your dependent variable (DV) to be normally distributed for each level of your independent variable (IV). Click once on to Group and select the arrow next to Factor List:

Now, click once on to Score and select the arrow next to Dependent List: The next step is to select the bottom button labeled Plots…

Richard S. Balkin, Ph.D., 2004

8

Click on the box in the middle that says Normality plots with tests

Click Continue. Then click OK

Richard S. Balkin, Ph.D., 2004

9

An output page similar to the one below will pop up.

On this page is information related to normality, including the Shapiro-Wilk statistic, skewness, and kurtosis for each group if you scroll down.

Richard S. Balkin, Ph.D., 2004

10

You can divide the skewness by the standard error. If your value is less than 2.576 (.01 level of significance) or 3.29 (.001 level of significance), then your distribution is approximately normal. Preferably, we will use the .01 level of significance in this class.

We still have to check our HOV assumption, which we will do when we run the ANOVA.

Richard S. Balkin, Ph.D., 2004

11

Once again, click Analyze, and then General Linear Model, then Univariate

Richard S. Balkin, Ph.D., 2004

12

Click once on to Group and select the arrow next to Fixed Factor(s): Now, click once on to Score and select the arrow next to Dependent Variable:

Next, click Options…

Richard S. Balkin, Ph.D., 2004

13

Click the boxes beside Descriptive statistics and Homogeneity tests—this will tell you whether or not you had unequal variances (HOV). Click Continue, then click OK on the next screen.

Richard S. Balkin, Ph.D., 2004

14

Your output will include descriptive statistics, the Levene statistic for testing Homogeneity of Variances, and your ANOVA results.

Richard S. Balkin, Ph.D., 2004

15

Now you are ready to run post hoc analyses.

Richard S. Balkin, Ph.D., 2004

16

Post Hoc Analysis To run a Tukey post hoc analysis to identify exactly where significant differences may be, go back to your data and click Analyze, and then General Linear Model, then Univariate

Richard S. Balkin, Ph.D., 2004

17

Now click Post Hoc…

Richard S. Balkin, Ph.D., 2004

18

Click once on Group and click on the arrow so that it moves underneath Post Hoc Tests for: Click the box next to Tukey. Then click Continue.

Then click OK on the next screen.

Richard S. Balkin, Ph.D., 2004

19

Notice your results. An * denotes significant differences between groups at the .05 level

of significance. However, if you have not set your alpha level to be different in SPSS, the

* will not be accurate. So, as a rule of thumb, ignore the *. Regardless of the *, always

compare the p-value to the alpha level you have set for your study.

Richard S. Balkin, Ph.D., 2004

20

Contrast Comparisons

Now, we will take a look at running contrast comparisons. For the purposes of this

exercise, we will run two contrasts:

Compare groups 1 and 3 to group 2.

Compare group 2 to group 3.

Click Analyze, and then Compare Means, then One-Way ANOVA…

Richard S. Balkin, Ph.D., 2004

21

Your screen will look like the one below:

Click once on Score and click the arrow next to Dependent List:

Then click once on Group and click the arrow next to Factor:

Then click Contrasts…

Richard S. Balkin, Ph.D., 2004

22

In comparing groups 1 and 3 to group 2, move the cursor to the box that says

Coefficients: and type .5

Then click Add

Richard S. Balkin, Ph.D., 2004

23

Now in the box that says Coefficients: type -1

and click Add

Richard S. Balkin, Ph.D., 2004

24

Now in the box that says Coefficients: type .5

and click Add

Richard S. Balkin, Ph.D., 2004

25

Now in the box that says Coefficients: type 0

and click Add

Richard S. Balkin, Ph.D., 2004

26

Now click Next

and repeat this process using the proper coefficients for the second contrast comparison:

0, 1, -1 and 0

Richard S. Balkin, Ph.D., 2004

27

Your screen should look like the one below:

Now click Continue

And click OK on the next screen

Richard S. Balkin, Ph.D., 2004

28

You will see a results page like the one below:

Richard S. Balkin, Ph.D., 2004

29

Richard S. Balkin, Ph.D., 2004

30

Transformations

For the purposes of explaining transformations, some changes in the previous data set

have been made for group four.

Richard S. Balkin, Ph.D., 2004

31

Notice that when the Shapiro-Wilk statistic is evaluated, group four is nonnormal.

Shapiro-Wilk for group four is less than .01 and therefore significantly deviates from a

normal distribution.

Richard S. Balkin, Ph.D., 2004

32

To perform a transformation, decide which procedure would be appropriate to use. For

this example, we will try a logarithmic transformation. Next click Transform then

Compute.

Richard S. Balkin, Ph.D., 2004

33

Create a name for your transformed variable. For this example, the variable name will be

trans_score. Then click the box under numeric expression.

Richard S. Balkin, Ph.D., 2004

34

Using the downward arrow under functions, click on LN (natural log).

Richard S. Balkin, Ph.D., 2004

35

Now click the upward arrow next to Functions. Your screen should look like the one

below.

Richard S. Balkin, Ph.D., 2004

36

Now double-click on Score and click OK

Richard S. Balkin, Ph.D., 2004

37

A new variable called tran_score appears in your data set.

Richard S. Balkin, Ph.D., 2004

38

Now, run your normality statistics again. But, in place of score for your dependent

variable, use tran_score.

Richard S. Balkin, Ph.D., 2004

39

Notice that all of the groups meet the assumption for normality.

Richard S. Balkin, Ph.D., 2004

40

Factorial ANOVA

We will use Lesson 25 Data file 1 on the CD in the Green & Salkind textbook. As in the

one-way ANOVA, you will need to analyze your model assumptions. Review pp. 6-15.

In running a factorial ANOVA, you will put in 2 independent variables instead of 1. For

the IV, Gender and Method were used; gpaimpr is our DV.

Richard S. Balkin, Ph.D., 2004

41

As before, click Analyze, and then General Linear Model, then Univariate

Richard S. Balkin, Ph.D., 2004

42

Click once on to Gender and select the arrow next to Factor List: Click once on to method and select the arrow next to Factor List: These are your independent variables. Note that gender has 2 levels (male and female). method has 3 levels. This would be a 2 by 3 (2 X 3) factorial ANOVA Click once on to gpaimpr and select the arrow next to Dependent Variable:

Richard S. Balkin, Ph.D., 2004

43

After you evaluate your data and analyze your model assumptions, you have to determine

if there is an interaction effect. First, select Options…

Richard S. Balkin, Ph.D., 2004

44

Your screen should look like the one below:

Click on OVERALL and then click the arrow. It will move your selection to Display

Means for: Repeat this process for gender, method, gender*method.

Richard S. Balkin, Ph.D., 2004

45

Your screen should look like the one below. Also, click the boxes next to Descriptive

statistics, Homogeneity tests, Estimates of effect size.

Click Continue

On the next screen click OK

Richard S. Balkin, Ph.D., 2004

46

Notice on your output that you have a non-significant interaction, as evidenced by the

results of gender*method: F (2, 54) = 2.921, p = .062.

In this particular case, you would report the main effects of each independent variable

and conduct a Tukey post hoc analysis on any IV with 3 or more levels. So, we would

need to do a Tukey for method. Follow the steps on pp. 16-19.

Richard S. Balkin, Ph.D., 2004

47

For an example of using SPSS when there is a significant interaction, we will use lesson

25 data file 2 on the CD in Green & Salkind.

Follow the same steps outlined on pp. 31-35.

Richard S. Balkin, Ph.D., 2004

48

This time, however, notice that you have a significant interaction, as evidenced by the

results of gender*method: F (2, 54) = 10.543, p < .0001.

Richard S. Balkin, Ph.D., 2004

49

At this point in time, you want to plot the interaction. You can do this by charting the

means from the output below:

Richard S. Balkin, Ph.D., 2004

50

You can also ask SPSS to plot the interaction. Click Analyze, and then General Linear

Model, then Univariate. Then click Plots…

Richard S. Balkin, Ph.D., 2004

51

Click once on method and then click the arrow next to Horizontal Axis.

Click once on Sex and then click the arrow next to Separate lines:

Then click Add

Richard S. Balkin, Ph.D., 2004

52

Your screen should look like the one below.

The numbers on the vertical axis represent scores for gpaimpr. You can see by the chart

that males and females perform differently across note-taking methods.

Richard S. Balkin, Ph.D., 2004

53

Since we have a significant interaction, we need to test for simple effects by sorting our

data and running an analysis for each level of an IV. This can be done in one of two

ways.

In the first method, we will use SPSS coding. SPSS can perform the proceeding steps using

the following coding formula in SPSS Syntax:

UNIANOVA DV BY IV1 IV2

/EMMEANS = TABLES (IV1 * IV2) COMP (IV2)

Click Analyze, and then General Linear Model, then Univariate. Then click Paste…

Richard S. Balkin, Ph.D., 2004

54

Now type your SPSS code using the formula above, highlight it, and click the run button.

The univariate tests below with the post hoc tests above show your results for the simple effects.

Richard S. Balkin, Ph.D., 2004

55

The next method is more involved, but it replicates the results of the first method, and it

also shows you how the results were derived. In other words, it replicates the SPSS code.

First, click Data and Select Cases…

Richard S. Balkin, Ph.D., 2004

56

Click the second selection If the condition is satisfied. Then click If…

Richard S. Balkin, Ph.D., 2004

57

Click once on gender and then click the arrow.

Richard S. Balkin, Ph.D., 2004

58

On the key pad (as shown below) click = 1.

Click Continue. Then on the next screen click OK.

Richard S. Balkin, Ph.D., 2004

59

Now, SPSS will only select cases in which gender = 1 (males only).

Now, run your ANOVA following steps on pp.11-19. You will need to consult your

lecture notes to interpret the output.

Follow steps on pp. 53-57 to run the analysis for females (sex = 2).

Richard S. Balkin, Ph.D., 2004

60

Repeated Measures

We will be using Lesson 28 data file 1 from the CD in Green & Salkind.

Richard S. Balkin, Ph.D., 2004

61

Click Analyze, and then General Linear Model, then Repeated Measures…

Richard S. Balkin, Ph.D., 2004

62

In this particular example, we will test to see if there are significant differences among

test scores on the Desire to Express Worry Scale after 0, 5, 10, and 15 years of marriage.

You will see this screen below:

Richard S. Balkin, Ph.D., 2004

63

Where it says factor1 by the box next to Within Subject Factor Name: erase and type

Time. Then type 4 in the box next to Number of Levels: Now click Add

Now click Define

Richard S. Balkin, Ph.D., 2004

64

Your box should look like the one below:

Richard S. Balkin, Ph.D., 2004

65

Click time1 and then the arrow for Within Subject Variables. Repeat this step for

time2, time3, and time4.

Click Options

Richard S. Balkin, Ph.D., 2004

66

Click once on OVERALL and then click the arrow to move the selection to Display

Means for. Repeat this step for time

Click the box next to Descriptive Statistics and then click Continue

Richard S. Balkin, Ph.D., 2004

67

On the next screen click OK. Your output should look like the following:

Review your course notes for interpretation.

Richard S. Balkin, Ph.D., 2004

68

To do a post hoc analysis, click Analyze, Compare Means, and then Paired Samples

T-Test.

Richard S. Balkin, Ph.D., 2004

69

Click one pair times to compare. In this example, I am comparing time1 to time2.

Richard S. Balkin, Ph.D., 2004

70

Click the arrow beside Paired Variables:

Richard S. Balkin, Ph.D., 2004

71

Now repeat this process for all possible comparisons.

Then click OK

Richard S. Balkin, Ph.D., 2004

72

Use your notes to interpret the results. Make sure you do a Bonferroni adjustment.

Richard S. Balkin, Ph.D., 2004

73

Multiple Regression

We will be using Lesson 33 Exercise file 1 on the CD of Green & Salkind. We want to

examine the extent of the relationship between stateexam (criterion variable) from

mathtest and engtest (predictor variables).

Richard S. Balkin, Ph.D., 2004

74

Click Analyze, Regression, Linear

Richard S. Balkin, Ph.D., 2004

75

Your screen should show the following:

Richard S. Balkin, Ph.D., 2004

76

Click once on math aptitude and then click the arrow by Independent(s):

Repeat this for English aptitude.

Richard S. Balkin, Ph.D., 2004

77

Then click on Average percentage and click the arrow next to Dependent:

Richard S. Balkin, Ph.D., 2004

78

Click Statistics and click the boxes next to Descriptives, Part and partial correlations,

and Collinearity diagnostics. Estimates and Model fit should already be selected.

Richard S. Balkin, Ph.D., 2004

79

Click Continue.

On the next screen click OK.

Refer to your notes for interpretation of output.

Richard S. Balkin, Ph.D., 2004

80

Evaluating model assumptions in multiple regression

From the Linear Regression screen click Plots

Richard S. Balkin, Ph.D., 2004

81

Insert the standardized predicted (ZPRED) and residual (ZRES) values in the X & Y axes. We will use this graph to determine the linearity and homoscedascity assumptions.

Richard S. Balkin, Ph.D., 2004

82

Now click on Save

Richard S. Balkin, Ph.D., 2004

83

Now click Standardized Residuals. This will create a new column in our data set. We will use this variable to examine the normality of our error variances.

Now click Continue and the OK.

Richard S. Balkin, Ph.D., 2004

84

Notice you have a new column for your standardized residuals (ZRE_1). Now click Analyze—Descriptive Statistics--Explore.

Richard S. Balkin, Ph.D., 2004

85

We will now run normality tests for the criterion variable, which must be normally distributed, and for our error variances, which should also be normally distributed. Click on the criterion variable (which in this case is the average percentage on the exam) and the standardized residuals and place them in the Dependent List. Then click Plots.

Richard S. Balkin, Ph.D., 2004

86

Because multiple regression is a large sample procedure, we will focus on the appearance of the box plots to determine if the criterion variable and error variances are normally distributed. Be sure to click Normality plots with tests and then Continue followed by OK.

This concludes the procedures for analyzing model assumptions. The sample output will be helpful in examining the procdures conducted.


Recommended