statistics analysis

profileProf.Norman the researcher
factorialanova.zip

ANOVA2 example1 with simple main effects.pdf

Y502 – Two-Way ANOVA 1

Two-Way Analysis of Variance

Betw een-Subjects Factors

group

counseling 8

individual

counseling 8

refused

counseling 8

female 12

male 12

1

2

3

GROUP

1

2

GENDER

Value Label N

Descriptive Statistics

Dependent Variable: LIFESATI

9.2500 .5000 4

13.2500 1.5000 4

11.2500 2.3755 8

5.0000 1.1547 4

11.2500 2.9861 4

8.1250 3.9438 8

5.0000 .8165 4

3.0000 .8165 4

4.0000 1.3093 8

6.4167 2.2344 12

9.1667 4.9696 12

7.7917 4.0215 24

GENDER

female

male

Total

female

male

Total

female

male

Total

female

male

Total

GROUP

group counseling

individual counseling

refused counseling

Total

Mean Std. Deviation N

Levene's Test of Equality of Error Variancesa

Dependent Variable: LIFESATI

3.939 5 18 .014

F df1 df2 Sig.

Tests the null hypothes is that the error variance of the

dependent variable is equal across groups.

Design: Intercept+GROUP+GENDER+GROUP

* GENDER

a.

Y502 – Two-Way ANOVA 2

Tests of Be tw een-Subjects Effects

Dependent Variable: LIFESATI

329.708a 5 65.942 28.093 .000 .886

1457.042 1 1457.042 620.751 .000 .972

211.583 2 105.792 45.071 .000 .834

45.375 1 45.375 19.331 .000 .518

72.750 2 36.375 15.497 .000 .633

42.250 18 2.347

1829.000 24

371.958 23

Source

Corrected Model

Intercept

GROUP

GENDER

GROUP * GENDER

Error

Total

Corrected Total

Type III Sum

of Squares df Mean Square F Sig.

Partial Eta

Squared

R Squared = .886 (Adjusted R Squared = .855)a.

Estimated Marginal Means

1. GROUP

Dependent Variable: LIFESATI

11.250 .542 10.112 12.388

8.125 .542 6.987 9.263

4.000 .542 2.862 5.138

GROUP

group counseling

individual counseling

refused counseling

Mean Std. Error Low er Bound Upper Bound

95% Conf idence Interval

2. GENDER

Dependent Variable: LIFESATI

6.417 .442 5.487 7.346

9.167 .442 8.237 10.096

GENDER

female

male

Mean Std. Error Low er Bound Upper Bound

95% Conf idence Interval

3. GROUP * GENDER

Dependent Variable: LIFESATI

9.250 .766 7.641 10.859

13.250 .766 11.641 14.859

5.000 .766 3.391 6.609

11.250 .766 9.641 12.859

5.000 .766 3.391 6.609

3.000 .766 1.391 4.609

GENDER

female

male

female

male

female

male

GROUP

group counseling

individual counseling

refused counseling

Mean Std. Error Low er Bound Upper Bound

95% Conf idence Interval

Y502 – Two-Way ANOVA 3

Profile Plots

group counseling individual counseling

refused counseling

group

2.00

4.00

6.00

8.00

10.00

12.00

14.00

E s ti

m a te

d M

a rg

in a l M

e a n

s

gender

female

male

Estimated Marginal Means of lifesati

female male

gender

2.00

4.00

6.00

8.00

10.00

12.00

14.00

E s

ti m

a te

d M

a rg

in a

l M

e a

n s

group

group counseling

individual counseling

refused counseling

Estimated Marginal Means of lifesati

cars(1)(1).sav

Factorial ANOVA in SPSS.pdf

EDPSY 641: Factorial ANOVA in SPSS

Example of Two Way Factorial ANOVA

I am still looking for a car. However, I am now willing to consider buying a used (or as they like to call them “previously owned” car instead. I am curious about how the year the car was released as well as the make of the car impact the acceleration of the car.

I now have a situation for a Two way ANOVA because I have

1 Dependent Variable: Acceleration

2 Independent Variables:

 Country of Origin (3 levels) o American o European o Japanese

 Model Year (2 levels)

o Older than 1975 o Newer than 1975

Now that we have 2 IVs, we have the possibility to have 3 different types of effect:

 A main effect of Country of Origin  A main effect of Model Year  A Country of Origin*Model Year Interaction

Recall that the Assumptions for Factorial ANOVA are:

-Normality -Homogeneity of Variances -Indpendence -Scale of Measurement.

So we should be sure to check Normality and Homogeneity of Variances along with our analysis.

EDPSY 641: Factorial ANOVA in SPSS

We can obtain descriptive statistics and a histogram from the Analyze- Descriptives-Frequencies menu…

Judging by the histogram and the skew/kurtosis statistics we can assume Normality.

And we can check Homogeneity of Variances at the time of running the analysis. So we can go ahead and set up our Factorial ANOVA

To run a Factorial ANOVA click Analyze → General Linear Model →Univariate

EDPSY 641: Factorial ANOVA in SPSS

Time to Accelerate is our Dependent Variable

Our Independent Variables: Country of Origin and Model Year go in the Fixed Factors Box

We will want thing from the Plots, Post Hoc and Options Menus..

Click on Plots

Here you can build your interaction plots.

You can put one variable on the horizontal (X) axis and represent the other as separate lines. If you have a 3rd variable you can make separate plots for the 3rd variable.

Whenever you input variables, though you must click add before you move on or the plot will not run.

Click Continue then Click Post Hoc.

EDPSY 641: Factorial ANOVA in SPSS

If we do NOT have a significant interaction we will want to look at some form of post hoc test for the main effects. If you want to use all pairwise comparisons you can run those at the time of running the Factorial ANOVA.

You must tell SPSS which variables you want to run post hoc’s on First: Click those over into the Post Hoc Tests for box.

Now it will allow you to choose whatever test you want.

Click Continue then Click Options

Here there are a variety of options you may want. Probably most important to grab would be:

1. Descriptive Statistics 2. Homogeneity Tests

Click Continue then Click OK to run the analysis.

EDPSY 641: Factorial ANOVA in SPSS

Univariate Analysis of Variance

Between-Subjects Factors Value Label N

1 American 253 2 European 73

Country of Origin

3 Japanese 79 0

1975 or older 188 Model_year

1 Newer than 1975 217

 

               

This indicates we have violated the assumption of homogeneity of variances

EDPSY 641: Factorial ANOVA in SPSS

               

       

We have a significant interaction so we skip the main effects and only interpret the interaction

Remember we also asked for post hoc tests just incase we needed them. But since our interaction was significant we can ignore them.

EDPSY 641: Factorial ANOVA in SPSS

Factorial ANOVA.pdf

EDPSY 642 – Factorial ANOVA 1

Factorial Analysis of Variance

Two-way analysis of variance examines differences between means on a dependent variable when there are two independent variables (or factors) with two or more levels. Two-way analysis of variance is part of a family of designs called factorial designs. Types of Factorial Designs • Crossed vs. Nested Designs

• Between Subjects vs. Within Subjects Designs

• Fixed Effects vs. Random Effects Designs

• Categorical and Continuous Independent Variables

• Three-Way, Four-Way, N-way Factorial Designs

EDPSY 642 – Factorial ANOVA 2

As in one-way ANOVA the independent variables are qualitative or nominal variables. The dependent variable should be measured on an interval or ratio-scale. Assumptions Independence - scores on the dependent measure are randomly and independently sampled. Normality - scores on the dependent measure come from a population where scores are normally distributed. Equality of Variance – the independent samples of scores come from populations with equal variances. Scale of Measurement – scores on the dependent variable are measured on an interval or ratio scale. In large sample, ANOVA is generally robust to violations of normality, and homogeneity of variance assumptions.

EDPSY 642 – Factorial ANOVA 3

ANOVA Main Effects and Interaction

A factorial ANOVA allows consideration of the effect of multiple independent variables on the dependent variables in the same study Main effect – the effect of a single variable on the

dependent variable Interaction – the combined effect of the independent

variables on the dependent variable. There is an interaction when the effect of one independent variable depends on the level of the other independent variable

Lets design a study testing the impact of counseling type and gender on life satisfaction. The Sources of Variability are:

- the main effect for “counseling type” - the main effect for “gender” - the interaction “counseling type*gender - error (everything left unaccounted for)

EDPSY 642 – Factorial ANOVA 4

Null Hypotheses - Null hypothesis for factor A:

H0 :µ1 = µ2 = µ3 =… = µ j [there is no difference between the different levels of A]

- Null hypothesis for factor B:

H0 :µ1 = µ2 = µ3 =… = µk [there is no difference between the different levels of B]

- Null Hypothesis for interaction:

H0 : all(µ jk −µ j . −µk . + µ) = 0 [there is no difference between the interaction cell means that cannot be explained by the effect of A or the effect of B]

2 Independent Variables: 2-Way ANOVA Counseling Type: 3 levels Gender: 2 levels

Independent Variables

Dependent Variable: Life Satisfaction Group Counseling

males females

Individual Counseling

males females

Refused Counseling

males females

EDPSY 642 – Factorial ANOVA 5

Partitioning the Sums of Squares

SStotal Total Variability

SSwithin SSBetween Within-Groups Between-Groups Variability Variability SSA SSB SSA*B Variability Variability Variability due to A due to B due to A*B

Interaction

EDPSY 642 – Factorial ANOVA 6

Interpretation of Main Effect and Interaction If significant interaction:

⇒DO NOT interpret main effects

⇒plot interaction ⇒conduct tests of simple effects

⇒conduct multiple comparisons for interaction

A significant interaction means that at least one of the cell means is significantly different from the other ones – that is the effect of one factor (A) is different at different levels of the other factor (B).

If non-significant interaction: ⇒ interpret significant main effects ⇒conduct post hoc comparisons (e.g., Scheffé if more than two means involved) If significant results also report measures of association

(η2, ω 2 )and effect sizes.

EDPSY 642 – Factorial ANOVA 7

Tests of Simple Effects

A simple effect is defined as the effect of one factor at one level of the other factor. Tests of simple effects allow us to determine if we see the same differences for one factor at each level of the other factor. Each Simple Effect is calculated as a sum of squares

SSsimple effect = n X jk − X j .( )∑ 2

We simply calculate the SS using only the data for one factor. Example from Howell (2007) Eysenck Data

Condition

Age

Counting Rhyming Adjective Imagery Intention Mean Older 7.0 6.9 11.0 13.4 12.0 10.06 Younger 6.5 7.6 14.8 17.6 19.3 13.16 Mean 6.75 7.25 12.9 15.5 15.65 11.61

Source df SS MS F Age (A) 1 240.25 240.25 29.94* Condition (C) 4 1514.94 378.735 47.19* A*C 4 190.30 47.575 5.93* Error 90 722.30 8.026 Total 99 2667.79 cell means n = 10

EDPSY 642 – Factorial ANOVA 8

Simple Effects calculations: Conditions at each Age SSCondition at OLD = 10 x [(7.0 – 10.06)2 + (6.9-10.06)2 + … + (12.0-10.06)2] = 351.52 SSC at YOUNG = 10 x [6.5 – 13.16)2 + (7.6 – 13.16)2 + … + (19.3 – 13.16)2 = 1353.72 Age at each Condition SSAge at Counting = 10 x [(7.0 - 6.75)2 + (6.5 – 6.75)2] = 1.25 SSA at Rhyming = 10 x [(6.9 - 7.25)2 + (7.6 – 7.25)2] = 2.45 SSA at Adjective = 10 x [(11.0 – 12.9)2 + (14.8 – 12.9)2] = 72.2 SSA at Imagery = 10 x [(13.4 – 15.5)2 + (17.6 – 15.5)2] = 88.2 SSA at Intention = 10 x[(12.0 – 15.65)2 + (19.3 – 15.65)2] = 266.45

* p < .05

MS = SS df

F = MS MSE

Source df SS MS F Conditions C at Old 4 351.52 87.88 10.95* C at Young 4 1353.72 338.43 42.15* Age A at Counting 1 1.25 1.25 .155 A at Rhyming 1 2.45 2.45 .305 A at Adjective 1 72.2 72.2 9.00* A at Imagery 1 88.2 88.2 10.99* A at Intentional 1 266.45 266.45 33.2* Error 90 722.30 8.03

Same error term and df from the ANOVA

EDPSY 642 – Factorial ANOVA 9

Interpretation: There are significant differences between memory conditions for both Older and Younger participants. However, differences did not seem to be present for the lower level memory tasks but were present at the higher level memory tasks. Since we just had two levels of Age, we can simply compare the means at each significant condition to see the nature of the differences. This is a relatively simple procedure for teasing apart interaction effects for factorial ANOVA. However, to use this procedure and be thorough, many tests are necessary which can seriously inflate the type I error rate. (Think about what would be necessary if there were 3 IVS or 5 levels for each IV????) Issue: If you test too many simple effects you either raise the familywise error rate to unacceptable levels or you control the familywise error rate at some reasonable level but lose power for each simple effect you test. Don’t calculate a contrast or simple effect unless you plan to discuss it when you write up the results!

EDPSY 642 – Factorial ANOVA 10

Multiple Comparison Procedures for Interactions Tests of simple effects are not terribly efficient. If you want to be thorough you have to do many different tests, which can inflate your type 1 error rate substantially. They are also essentially atheoretical. One does not require any theory or hypotheses of any kind to work from a simple main effects design. This is fine if your study is truly exploratory. However if you do have a theoretical framework or solid hypotheses to work from, it may be best to take a more targeted approach. All of the a priori multiple comparison procedures discussed as follow- up to the One Way ANOVA can still be used!

• Bonferroni • Scheffe* • Dunn-Sidak • Etc.. (if you remember… there are MANY)

*Depending on the number of IVs and number of levels of each IV, Scheffe can often be overly conservative. Probably the best place to start with proper interpretation of any interaction is to plot it!

EDPSY 642 – Factorial ANOVA 11

Differences in Independence as a factor of birth order and gender… Firstborn Middle Born Last Born Composite Males

73.15 79.87

19

=

=

=

s Y n

ij

ij

ij

93.18 62.90

12

=

=

=

s Y n

ij

ij

ij

41.11 07.72

15

=

=

=

s Y n

ij

ij

ij

09.17 40.83

46

=

=

=

s Y n

ij

ij

ij

Females

03.17 14.85

19

=

=

=

s Y n

ij

ij

ij

49.15 86.71

12

=

=

=

s Y n

ij

ij

ij

17.20 94.77

16

=

=

=

s Y n

ij

ij

ij

24.18 30.79

47

=

=

=

s Y n

ij

ij

ij

46.84 38 =

=

Y n ij

ij

24.81 24

=

=

Y n ij

ij

10.75 31 =

=

Y n ij

ij

Source df F Sig Birth Order 2 3.97 0.022 Gender 1 1.32 0.254 Birth Order x Gender 2 3.74 0.028 Error 87 MSE = 277.91

70

75

80

85

90

95

First Born

Middle Born

Last Born

Birth Order

M ea

n S

co re

Males Females

EDPSY 642 – Factorial ANOVA 12

A significant interaction, remember, means that the effect of one independent variable, on the dependent variable differs at different levels of the other independent variable(s). So in terms of this example, there is a difference(s) in the effect of birth order on relationship beliefs between genders. OR, the effect of birth order is different for men and women. (I think the plot describes this beautifully!) It is now our job to determine the nature of these differences. Recall:

Bonferroni (a priori) tcrit n – 2df, number of contrasts being tested

Scheffe Fcrit (1, n - k) for a priori Fcrit (k - 1)Fα(k – 1, n – k) for post hoc

Keep in mind: When choosing appropriate contrasts there is no one absolute correct solution. Sometimes you have to get creative!

F = Ψ 2

MSe w 2

n j

t = Ψ

MSe w 2

n j

EDPSY 642 – Factorial ANOVA 13

One Option: Are males always higher than females? We know the answer is a resounding “NO”. But the question remains, which males aren’t? H1: µfirst born males > µfirst born females

H2: µsecond born males > µsecond born females

H3: µlast born males > µlast born females

H1 : t = (1)87.79+ (−1)85.14

277.91 (1) 2

19 + (−1)2

19 #

$ %

&

' (

= 2.65 5.41

= .489

H2 : t = (1)90.62+ (−1)(71.86)

277.91 (1) 2

12 + (−1)2

12 #

$ %

&

' (

= 18.76 6.81

= 2.75

H2 : t = (1)72.02+ (−1)(77.94)

277.91 (1) 2

15 + (−1)2

16 #

$ %

&

' (

= −5.87 4.90

= −1.20

EDPSY 642 – Factorial ANOVA 14

What patterns do we see for birth order?

H4 :µ3M < µ1M + µ2M

2

H5: µ1M < µ2M

H6 :µ1F > µ2F + µ3F

2

H7: µ3F > µ2F

H4 : t = (1)87.79+ (1)90.62+ (−2)72.07

277.91 (1) 2

19 + (1)2

12 + (−2)2

15 #

$ %

&

' (

= 34.27 10.57

= 3.242

H5 : t = (−1)87.79+ (1)90.62

277.91 (1) 2

19 + (−1)2

12 #

$ %

&

' (

= 2.83 6.14

= .461

H6 : t = (2)85.14+ (−1)71.86+ (−1)77.94

277.91 (2) 2

19 + (−1)2

12 + (−1)2

16 #

$ %

&

' (

= 20.48 9.95

= 2.05

H7 : t = (−1)71.86+ (1)77.94

277.91 (−1) 2

12 + (1)2

16 #

$ %

&

' (

= 6.08 6.36

= .955

Lets say we did ALL of these comparisons: tcrit Bonferroni (7 comparisons, 90df) = 2.76 Lets say we did only the first 3 comparisons: tcrit Bonferroni (3 comparisons, 90df) = 2.44 Power considerations!!!!!

Factorial ANOVA(1).pdf

EDPSY 642 – Factorial ANOVA 1

Factorial Analysis of Variance

Two-way analysis of variance examines differences between means on a dependent variable when there are two independent variables (or factors) with two or more levels. Two-way analysis of variance is part of a family of designs called factorial designs. Types of Factorial Designs • Crossed vs. Nested Designs

• Between Subjects vs. Within Subjects Designs

• Fixed Effects vs. Random Effects Designs

• Categorical and Continuous Independent Variables

• Three-Way, Four-Way, N-way Factorial Designs

EDPSY 642 – Factorial ANOVA 2

As in one-way ANOVA the independent variables are qualitative or nominal variables. The dependent variable should be measured on an interval or ratio-scale. Assumptions Independence - scores on the dependent measure are randomly and independently sampled. Normality - scores on the dependent measure come from a population where scores are normally distributed. Equality of Variance – the independent samples of scores come from populations with equal variances. Scale of Measurement – scores on the dependent variable are measured on an interval or ratio scale. In large sample, ANOVA is generally robust to violations of normality, and homogeneity of variance assumptions.

EDPSY 642 – Factorial ANOVA 3

ANOVA Main Effects and Interaction

A factorial ANOVA allows consideration of the effect of multiple independent variables on the dependent variables in the same study Main effect – the effect of a single variable on the

dependent variable Interaction – the combined effect of the independent

variables on the dependent variable. There is an interaction when the effect of one independent variable depends on the level of the other independent variable

Lets design a study testing the impact of counseling type and gender on life satisfaction. The Sources of Variability are:

- the main effect for “counseling type” - the main effect for “gender” - the interaction “counseling type*gender - error (everything left unaccounted for)

EDPSY 642 – Factorial ANOVA 4

Null Hypotheses - Null hypothesis for factor A:

H0 :µ1 = µ2 = µ3 =… = µ j [there is no difference between the different levels of A]

- Null hypothesis for factor B:

H0 :µ1 = µ2 = µ3 =… = µk [there is no difference between the different levels of B]

- Null Hypothesis for interaction:

H0 : all(µ jk −µ j . −µk . + µ) = 0 [there is no difference between the interaction cell means that cannot be explained by the effect of A or the effect of B]

2 Independent Variables: 2-Way ANOVA Counseling Type: 3 levels Gender: 2 levels

Independent Variables

Dependent Variable: Life Satisfaction Group Counseling

males females

Individual Counseling

males females

Refused Counseling

males females

EDPSY 642 – Factorial ANOVA 5

Partitioning the Sums of Squares

SStotal Total Variability

SSwithin SSBetween Within-Groups Between-Groups Variability Variability SSA SSB SSA*B Variability Variability Variability due to A due to B due to A*B

Interaction

EDPSY 642 – Factorial ANOVA 6

Interpretation of Main Effect and Interaction If significant interaction:

⇒DO NOT interpret main effects

⇒plot interaction ⇒conduct tests of simple effects

⇒conduct multiple comparisons for interaction

A significant interaction means that at least one of the cell means is significantly different from the other ones – that is the effect of one factor (A) is different at different levels of the other factor (B).

If non-significant interaction: ⇒ interpret significant main effects ⇒conduct post hoc comparisons (e.g., Scheffé if more than two means involved) If significant results also report measures of association

(η2, ω 2 )and effect sizes.

EDPSY 642 – Factorial ANOVA 7

Tests of Simple Effects

A simple effect is defined as the effect of one factor at one level of the other factor. Tests of simple effects allow us to determine if we see the same differences for one factor at each level of the other factor. Each Simple Effect is calculated as a sum of squares

SSsimple effect = n X jk − X j .( )∑ 2

We simply calculate the SS using only the data for one factor. Example from Howell (2007) Eysenck Data

Condition

Age

Counting Rhyming Adjective Imagery Intention Mean Older 7.0 6.9 11.0 13.4 12.0 10.06 Younger 6.5 7.6 14.8 17.6 19.3 13.16 Mean 6.75 7.25 12.9 15.5 15.65 11.61

Source df SS MS F Age (A) 1 240.25 240.25 29.94* Condition (C) 4 1514.94 378.735 47.19* A*C 4 190.30 47.575 5.93* Error 90 722.30 8.026 Total 99 2667.79 cell means n = 10

EDPSY 642 – Factorial ANOVA 8

Simple Effects calculations: Conditions at each Age SSCondition at OLD = 10 x [(7.0 – 10.06)2 + (6.9-10.06)2 + … + (12.0-10.06)2] = 351.52 SSC at YOUNG = 10 x [6.5 – 13.16)2 + (7.6 – 13.16)2 + … + (19.3 – 13.16)2 = 1353.72 Age at each Condition SSAge at Counting = 10 x [(7.0 - 6.75)2 + (6.5 – 6.75)2] = 1.25 SSA at Rhyming = 10 x [(6.9 - 7.25)2 + (7.6 – 7.25)2] = 2.45 SSA at Adjective = 10 x [(11.0 – 12.9)2 + (14.8 – 12.9)2] = 72.2 SSA at Imagery = 10 x [(13.4 – 15.5)2 + (17.6 – 15.5)2] = 88.2 SSA at Intention = 10 x[(12.0 – 15.65)2 + (19.3 – 15.65)2] = 266.45

* p < .05

MS = SS df

F = MS MSE

Source df SS MS F Conditions C at Old 4 351.52 87.88 10.95* C at Young 4 1353.72 338.43 42.15* Age A at Counting 1 1.25 1.25 .155 A at Rhyming 1 2.45 2.45 .305 A at Adjective 1 72.2 72.2 9.00* A at Imagery 1 88.2 88.2 10.99* A at Intentional 1 266.45 266.45 33.2* Error 90 722.30 8.03

Same error term and df from the ANOVA

EDPSY 642 – Factorial ANOVA 9

Interpretation: There are significant differences between memory conditions for both Older and Younger participants. However, differences did not seem to be present for the lower level memory tasks but were present at the higher level memory tasks. Since we just had two levels of Age, we can simply compare the means at each significant condition to see the nature of the differences. This is a relatively simple procedure for teasing apart interaction effects for factorial ANOVA. However, to use this procedure and be thorough, many tests are necessary which can seriously inflate the type I error rate. (Think about what would be necessary if there were 3 IVS or 5 levels for each IV????) Issue: If you test too many simple effects you either raise the familywise error rate to unacceptable levels or you control the familywise error rate at some reasonable level but lose power for each simple effect you test. Don’t calculate a contrast or simple effect unless you plan to discuss it when you write up the results!

EDPSY 642 – Factorial ANOVA 10

Multiple Comparison Procedures for Interactions Tests of simple effects are not terribly efficient. If you want to be thorough you have to do many different tests, which can inflate your type 1 error rate substantially. They are also essentially atheoretical. One does not require any theory or hypotheses of any kind to work from a simple main effects design. This is fine if your study is truly exploratory. However if you do have a theoretical framework or solid hypotheses to work from, it may be best to take a more targeted approach. All of the a priori multiple comparison procedures discussed as follow- up to the One Way ANOVA can still be used!

• Bonferroni • Scheffe* • Dunn-Sidak • Etc.. (if you remember… there are MANY)

*Depending on the number of IVs and number of levels of each IV, Scheffe can often be overly conservative. Probably the best place to start with proper interpretation of any interaction is to plot it!

EDPSY 642 – Factorial ANOVA 11

Differences in Independence as a factor of birth order and gender… Firstborn Middle Born Last Born Composite Males

73.15 79.87

19

=

=

=

s Y n

ij

ij

ij

93.18 62.90

12

=

=

=

s Y n

ij

ij

ij

41.11 07.72

15

=

=

=

s Y n

ij

ij

ij

09.17 40.83

46

=

=

=

s Y n

ij

ij

ij

Females

03.17 14.85

19

=

=

=

s Y n

ij

ij

ij

49.15 86.71

12

=

=

=

s Y n

ij

ij

ij

17.20 94.77

16

=

=

=

s Y n

ij

ij

ij

24.18 30.79

47

=

=

=

s Y n

ij

ij

ij

46.84 38 =

=

Y n ij

ij

24.81 24

=

=

Y n ij

ij

10.75 31 =

=

Y n ij

ij

Source df F Sig Birth Order 2 3.97 0.022 Gender 1 1.32 0.254 Birth Order x Gender 2 3.74 0.028 Error 87 MSE = 277.91

70

75

80

85

90

95

First Born

Middle Born

Last Born

Birth Order

M ea

n S

co re

Males Females

EDPSY 642 – Factorial ANOVA 12

A significant interaction, remember, means that the effect of one independent variable, on the dependent variable differs at different levels of the other independent variable(s). So in terms of this example, there is a difference(s) in the effect of birth order on relationship beliefs between genders. OR, the effect of birth order is different for men and women. (I think the plot describes this beautifully!) It is now our job to determine the nature of these differences. Recall:

Bonferroni (a priori) tcrit n – 2df, number of contrasts being tested

Scheffe Fcrit (1, n - k) for a priori Fcrit (k - 1)Fα(k – 1, n – k) for post hoc

Keep in mind: When choosing appropriate contrasts there is no one absolute correct solution. Sometimes you have to get creative!

F = Ψ 2

MSe w 2

n j

t = Ψ

MSe w 2

n j

EDPSY 642 – Factorial ANOVA 13

One Option: Are males always higher than females? We know the answer is a resounding “NO”. But the question remains, which males aren’t? H1: µfirst born males > µfirst born females

H2: µsecond born males > µsecond born females

H3: µlast born males > µlast born females

H1 : t = (1)87.79+ (−1)85.14

277.91 (1) 2

19 + (−1)2

19 #

$ %

&

' (

= 2.65 5.41

= .489

H2 : t = (1)90.62+ (−1)(71.86)

277.91 (1) 2

12 + (−1)2

12 #

$ %

&

' (

= 18.76 6.81

= 2.75

H2 : t = (1)72.02+ (−1)(77.94)

277.91 (1) 2

15 + (−1)2

16 #

$ %

&

' (

= −5.87 4.90

= −1.20

EDPSY 642 – Factorial ANOVA 14

What patterns do we see for birth order?

H4 :µ3M < µ1M + µ2M

2

H5: µ1M < µ2M

H6 :µ1F > µ2F + µ3F

2

H7: µ3F > µ2F

H4 : t = (1)87.79+ (1)90.62+ (−2)72.07

277.91 (1) 2

19 + (1)2

12 + (−2)2

15 #

$ %

&

' (

= 34.27 10.57

= 3.242

H5 : t = (−1)87.79+ (1)90.62

277.91 (1) 2

19 + (−1)2

12 #

$ %

&

' (

= 2.83 6.14

= .461

H6 : t = (2)85.14+ (−1)71.86+ (−1)77.94

277.91 (2) 2

19 + (−1)2

12 + (−1)2

16 #

$ %

&

' (

= 20.48 9.95

= 2.05

H7 : t = (−1)71.86+ (1)77.94

277.91 (−1) 2

12 + (1)2

16 #

$ %

&

' (

= 6.08 6.36

= .955

Lets say we did ALL of these comparisons: tcrit Bonferroni (7 comparisons, 90df) = 2.76 Lets say we did only the first 3 comparisons: tcrit Bonferroni (3 comparisons, 90df) = 2.44 Power considerations!!!!!

Goggles_Simple Effects EX.pdf

Factorial  ANOVA:    Beer  Goggles  Example  

  1  

                                         

                     

     

Factorial  ANOVA:    Beer  Goggles  Example  

  2  

   

                                                       

 

Factorial  ANOVA:    Beer  Goggles  Example  

  3  

                         

   

Factorial  ANOVA:    Beer  Goggles  Example  

  4  

                           

 

 

     

Goggles_Simple Effects EX(1).pdf

Factorial  ANOVA:    Beer  Goggles  Example  

  1  

                                         

                     

     

Factorial  ANOVA:    Beer  Goggles  Example  

  2  

   

                                                       

 

Factorial  ANOVA:    Beer  Goggles  Example  

  3  

                         

   

Factorial  ANOVA:    Beer  Goggles  Example  

  4  

                           

 

 

     

ONLINE_EDPS Project 3(2).pdf

Assignment  3:    Factorial  ANOVA  

Assignment  3:    Data  Analysis  using  Factorial  ANOVA    (25pts  Total)     Using  the  Therapy.sav  SPSS  file:     1. You  are  a  faculty  member  in  a  Counseling  Psychology  department  and  your  main  

research  interests  involve  gender  differences  in  the  efficacy  of  therapeutic  treatments   for  stalking.    Recently,  you  have  been  working  mostly  with  two  newly  emerging   treatments  we  will  call  Therapy  1  and  Therapy  2.    You  collect  data  on  50  individuals   who  have  been  diagnosed  with  moderate  to  severe  stalking  tendencies.    You  want  to   know  how  gender  and  therapy  type  (therapy)  impact  the  efficacy  of  stalking   treatment  post  therapy  (post_therapy).    However,  you  are  most  interested  in  whether   there  are  gender  differences  in  the  efficacy  of  the  different  therapies.     a. Describe  the  sample.  [5]  

i. How  many  males?    Females?   ii. How  many  individuals  receiving  each  therapy?   iii. Describe  typical  performance.    Present  means/standard  deviations  for  

each  group.    

b. Check  Assumptions  for  this  Analysis.    [4]   i. Name  each  assumptions   ii. For  each  assumption,  tell  me  if  the  assumption  is  met  AND  what  

evidence  you  based  your  decision  on.    

c. Run  this  analysis  in  SPSS.  [4]     Your  output  should  include  (but  not  be  restricted  to):  

i. Descriptive  Statistics   ii. Estimates  of  Effect  Size   iii. Plot  of  the  interaction  

  d. Interpret  your  results  so  far.    Look  at  your  main  effects  and  interaction(s).    What  

do  you  know  at  this  point?    [2]    

e. Follow-­‐up  tests.    In  order  to  follow  up  on  your  results,  you  decide  to  test  the   following  two  hypotheses  using  Bonferroni  contrasts.  

  Hypothesis  1:  Therapy  1  was  more  effective  for  males  than  females.   Hypothesis  2:    Therapy  2  was  more  effective  for  females  than  males.    

i. Compute  the  t-­‐value  for  Hypothesis  1  [2]   ii. Compute  the  t-­‐value  for  Hypothesis  2.  [2]   iii. What  is  the  Bonferroni  critical  value  for  this  situation?  [2]   iv. Is  Hypothesis  1  significant?    What  does  this  mean?    [2]   v. Is  Hypothesis  2  significant?    What  does  this  mean?  [2]  

   

Therapy(1)(1).sav

Using SPSS to help compute Tests of Simple Effects.pdf

Using  SPSS  to  help  compute  Tests  of  Simple  Effects:   Part  1:    The  intuitive  way:     Step  1:    Using  the  Split  file.     Because  tests  of  simple  effects  are  essentially  a  set  of  one-­‐way  ANOVAs  for  one   independent  variable…  each  one  run  at  only  one  level  of  the  other  independent  variable…   our  goal  will  be  to  first  split  one  of  our  independent  variables.    This  will  be  accomplished   with  a  split  file.    

Go  to  Data  -­>  Split  File                                            

  We  want  to  split  one  of  our   independent  variables  so  that   we  can  compare  each  level   individually.     -­‐Click  compare  groups     -­‐Click  one  of  the  IVs  into  the   Groups  based  on  box.       -­‐Click  OK      

You  have  not  run  any  analyses  yet!    So  you  will  not  have  anything   in  your  output  at  this  point  except  for  a  syntax  statement  telling   you  that  you  implemented  a  split  file.    You  will  know  the  split  file   worked  if  you  check  the  lower  right  hand  column  of  your  data  file.     It  will  say  Split  By  Origin  to  indicate  that  your  split  file  is  on  and   comparing  groups  on  origin.  

    NOW  we  will  run  our  first  set  of  simple  effects.    Simple  Effects  are  just  one-­‐way  ANOVAs  so   just  go  to  analyze  -­>  compare  means  -­>  one  way  ANOVA        

  Our  dependent   variable  is  time  to   accelerate.     Since  we  split  our  file   for  country  of  origin   we  can  now  easily  find   simple  effects  for   model  year:          

“Is  there  an  effect  of  model  year  for  American  cars…  European  cars…  Japanese  cars?”                                  

The  sum  of  squares  between  will  be  the   sum  of  squares  for  the  simple  effects  of   Origin  at  Model  Year!  

The  df,  MS  and  F  will  not  be  correct  for   the  simple  effects  though  as  they  are   not  using  the  correct  error.    You  will   have  to  compute  those  yourself.  

Now  that  we  have  the  simple  effects  for  Model  Year  AT  Origin  we  need  to  get  the  simple   effects  for  Origin  at  Model  Year.    To  do  this  we  need  to:  

1. Change  our  split  file  to  Model  Year   2. Run  a  one-­‐way  ANOVA  for  Origin  

      1.    

   

           

   

   

2.                              

         

      These  Sums  of  Squares  Between  are  the  Sums  of  Squares  for  the  Simple  effects  for  Model   Year  at  Origin!     (Recall  our  Original  Factorial  ANOVA  results  from  your  example  on  blackboard)  

                           

To  get  the  significance  tests,  now,  we  need  to  form  our  table  and  enter  the  sum  of  squares   from  the  SPSS  output.       Source   Sum  of  Squares   df   Mean  Square   F  

American   194.102   1   194.102   28.04   European   6.363   1   6.363   .919  

Model  Year  at  

Japanese   .002   1   .002   .0002              

Old   224.407   2   112.204   16.21  Origin  at   New   50.524   2   25.262   3.649  

              Error   2768.774   400   6.922          

Part  2:    The  harder  way  using  SPSS  syntax.     This  method  will  do  all  of  the  simple  effects  for  you  (with  the  correct  F  values).   However,  it  is  not  intuitive,  and  sometimes  difficult  to  set  up.       Step  1.    Set  up  your  Factorial  ANOVA  but  do  not  hit  OK  to  run  the  model.     Step  2.    Hit  PASTE    

    This  will  open  up  a  syntax  window.    It  has  pasted  the  SPSS  syntax  for  everything  you  just   asked  SPSS  to  run.    IF  you  highlight  this  and  hit  the  blue  arrow  it  will  run  the  analysis  you   requested.    BUT  FIRST…     Step  3.    Delete  the  period  at  the  end  of  the  syntax!!      

      Now  SPSS  knows  to  expect  more  in  this  command.     Step  4.    Adding  to  the  SPSS  syntax.         Add  the  following  commands  to  the  syntax:     /emmeans  =  tables(origin*model_year)  compare(origin)   /emmeans  =tables(model_year*origin)  compare(model_year).  

 

      Its  not  elegant  and  will  report  some  redundant  information,  however  it  will  give  you  all  the   simple  effects  (it’s  the  best  way  I’ve  found  so  far  to  organize  it  easily)       Step  4:    Highlight  the  output  and  hit  the  blue  arrow  to  run  the  analysis.     In  addition  to  your  analysis  you  will  now  have  the  following  new  boxes:            

                           

             

   

       

                         

Simple   Effects:     Origin  at   Model_Year  

           

     

         

Simple  Effects  :     Model_Year  at  Origin