Factorial Anova SPSS example PDF

Title Factorial Anova SPSS example
Author Laura Andrews
Course Educational Statistics Ii
Institution Kent State University
Pages 12
File Size 785.6 KB
File Type PDF
Total Downloads 108
Total Views 158

Summary

Factorial ANOVA notes...


Description

Factorial ANOVA: SPSS Procedures and Results This file will cover how to run a factorial Analysis of Variance (ANOVA) using SPSS. The file we will be using is titled “hourlywagedata.sav” which includes data from nurses. In this file, there are four variables; we will be focusing on two independent variables: “agerange” and “position”; and one dependent variable “hourwage”. We will be running an F test to determine if different age groups earned different amounts of money, if nurses in different positions (office vs. hospital) earn different amounts of money, and if there is an interaction between age and position in how much money nurses make. To run a factorial ANOVA, follow the steps below: 1) Select “Analyze” from the list of menu options at the top of the screen. 2) Then, scroll down to “General linear model” and select “Univariate”.

3) When the “Univariate” window pops up, you want to select “Hourly Salary” as the dependent variable, and “Age Range” and “Nurse Type” as the fixed factors (these are the independent variables).

4) Before selecting “OK” to run the analysis, you will typically want some options, such as descriptive statistics, so select “Options”.

5) In the “Options” window, select “Descriptive statistics” and “Homogeneity tests” at minimum. You may also want “Estimates of effect size” and “Observed power”.

6) Next, select “Continue” and then “OK”. A results file will then be created with the following information (the asterisks indicate my commentary).

Univariate Analysis of Variance Between-Subjects Factors Nurse Type

0

Age Range

1 1 2 3

Value Label Hospital Office

N 670

18-30

300 144

31-45 46-65

548 278

This above table simply tells us how many groups were compared and how they were labeled. You can see here that the nurses were divided into 3 age ranges groups, and Group 1 included nurses with ages from 18 to 30, Group 2 included those aged 31 to 45, and Group 3 included those ages 46-65. There were two nurse positions, or two levels of “Nurse Type”: Hospital and Office. Descriptive Statistics Dependent Variable:Hourly Salary Nurse Type Age Range Mean Std. Deviation Hospital 18-30 19.6850 3.39783 31-45 20.6923 3.32568 46-65 21.3353 3.56089 Total 20.7154 3.43873 Office 18-30 17.3765 4.18595 31-45 19.0402 4.35424 46-65 19.3544 4.65576 Total 18.9137 4.45501 Total 18-30 19.0438 3.76446 31-45 20.1828 3.74823 46-65 20.6869 4.05268 Total 20.1582 3.87069

N 104 379 187 670 40 169 91 300 144 548 278 970

The second table simply provides the means, standard deviations, and group sizes for each of the age range and nurse type groups. You can see the means for each of the “cells,” or age ranges within nurse types, the overall means, or totals, for each nurse type, and the overall means, or totals, for age range. Finally, you can see the grand mean, which is 20.21582.

Levene's Test of Equality of Error Variancesa Dependent Variable:Hourly Salary F df1 df2 Sig. 7.064 5 964 .000 Tests the null hypothesis that the error variance of the dependent variable is equal across groups. a. Design: Intercept + position + agerange + position * agerange

One of the three assumptions for conducting Analysis of Variance is that the variability of scores within each group is equal. The Levene’s test is one of the tests that exist to test that assumption, and the one provided by SPSS. You DO NOT want this test to be statistically significant. In other words, you want the F value to be low (close to 1), and the p value to be greater than .05. However, our p value is . 000, which is less than .05. This indicates that the assumption of homogeneity of variance is violated. We should use a smaller alpha level, such as .025 instead of . 05, to tests our null hypotheses in order to account for the violation of this assumption.

Source Corrected Model Intercept position agerange position * agerange Error Total Corrected Total

Type III Sum of Squares 970.062a 231944.012 593.229 260.517 11.680 13547.742 408679.974 14517.804

df 5 1 1 2 2 964 970 969

Mean Square 194.012 231944.012 593.229 130.258 5.840 14.054

F 13.805 16504.155 42.212 9.269 .416

Sig. .000 .000 .000 .000 .660

This table includes the results of the actual test of group mean differences. This is the “ANOVA Table” (the most important rows are highlighted). The main effects are the rows that start with “position” and “agerange”. As you can see, both are statistically significant: F(1, 964) = 42.212, p = .000 for position and F(2, 964) = 42.212, p = .000 for age. However, the interaction is not statistically significant, F(2, 964) = 0.416, p = .660. Based on these results, you would run post-hoc tests for age, since the effect of age is statistically significant, and it has more than two levels (post-hoc tests are covered in an earlier unit, so you should know how to run them). There is no need to run post-hoc tests for position or “Nurse Type” since there is only two levels, and we already know that those two levels significantly differ from one another. While the interaction is not statistically significant, if it were, you would run what are called “tests of simple main effects”. These are basically post-hoc tests for interaction effects This is done by holding the levels constant on one (or more) of the independent variables, and then comparing levels on the other. In other words, you would compare the levels of one independent variable WITHIN the levels of the other. For example, I could hold position constant, and compare ages within each position, or I could hold age constant, and compare positions with each age group. Which you choose depends on the focus of your study. In SPSS, you cannot conduct tests of simple main effects from the regularly drop-

down menus; you must use syntax. We have not covered syntax yet, but basically syntax is the “programming language” for SPSS. In early versions of SPSS, data entry and analyses were done completely through syntax. Even now, some analyses can only be performed using the syntax function. You can obtain the syntax for any analysis you run in SPSS. This has some advantages as you can save your syntax files for the analyses you run, and then use them at a later time to run the analysis without having to remember exactly what you did. This might be useful if you make corrections or add data to a data set. You can obtain the syntax by selecting the “Paste” option, instead of “Ok” in the “Univariate” window.

Before you do that, though, go to the options menu, and place each of the variables and the interaction term under “Estimated Marginal Means” into the “Display Means for” window. Then, select “Compare main effects” and choose either “Sidak” or “Bonferroni”. Do not use the “LSD” test, as it does not adjust for multiple comparisons.

Select “Continue” and then “Paste”. You should get a new window that has the SPSS syntax for the analysis you intend to run.

You can copy and paste the syntax into any word processing program. The syntax for the analysis we are conducting looks like this: UNIANOVA hourwage BY position agerange /METHOD=SSTYPE(3) /INTERCEPT=INCLUDE /EMMEANS=TABLES(position) COMPARE ADJ(SIDAK) /EMMEANS=TABLES(agerange) COMPARE ADJ(SIDAK) /EMMEANS=TABLES(position*agerange) /PRINT=OPOWER ETASQ HOMOGENEITY DESCRIPTIVE /CRITERIA=ALPHA(.05) /DESIGN=position agerange position*agerange. When we added the estimated marginal means, we added the lines that say “/EMMEANS”. We also added tests of main effects, which is the part of the line that says: “COMPARE ADJ(SIDAK)”. We don’t really need these tests for the main effects, but we do need something similar for the interaction. The interaction is the line that reads: /EMMEANS=TABLES(position*agerange)

To add a test of simple main effects, you must add “COMPARE (agerange) ADJ(SIDAK)” to the end of this line, so that it looks like this: /EMMEANS=TABLES(position*agerange) COMPARE (agerange) ADJ(SIDAK). What this means is that we are using Sidak post-hoc tests to compare age ranges within positions. The variable we place in parentheses after “COMPARE” indicates the variable that we want to compare levels on. The other variable will be held constant. So, once we change the syntax, we can select “Run All” from the menu at the top of the screen, and this will run our analysis.

The new table we are concerned with looks like this: Pairwise Comparisons Dependent Variable:Hourly Salary (I) Age Nurse Type Range Hospital 18-30

Office

Mean Difference (I-J) -1.007* -1.650* 1.007*

31-45

(J) Age Range 31-45 46-65 18-30

46-65

46-65 18-30

-.643 1.650*

.335 .459

.157 .001

-1.444 .553

.158 2.747

31-45

31-45 31-45 46-65 18-30

.643 -1.664* -1.978* 1.664*

.335 .659 .711 .659

.157 .035 .016 .035

-.158 -3.240 -3.679 .087

1.444 -.087 -.277 3.240

46-65

46-65 18-30

-.314 1.978*

.487 .711

.889 .016

-1.480 .277

.852 3.679

31-45

.314

.487

.889

-.852

1.480

18-30

Std. Error

95% Confidence Interval for Differencea Sig.a

.415 .459 .415

Lower Bound .045 -2.000 .001 -2.747 .045 .015

Upper Bound -.015 -.553 2.000

Based on estimated marginal means *. The mean difference is significant at the a. Adjustment for multiple comparisons: Sidak.

What you will see here is that we are comparing the 3 age ranges within each level of Nurse Type. So, first we look at “Hospital” under “Nurse Type” and compare the three age groups. Then, we compare the three age groups under “Office”. You will also notice that some of the group differences are statistically significant, according to the test of simple main effects. This can happen sometimes; the overall F test can be non-significant, but there are statistically significant post-hoc tests. The important thing to remember is that you DO NOT conduct post-hoc tests or tests of simple main effects if the overall F test is not statistically significant. The overall F test supersedes the post-hoc tests. I only conduct tests of simply main effects here for illustrative purposes. Also, the reason why this happened here is that the pattern is the same for both levels of “Nurse Type” so essentially the significant differences found in this table are due to the main effect for age group, and not

because of the interaction (if there were an interaction present, the pattern of results would be different within each “Nurse Type” group)....


Similar Free PDFs