Field_2005_chapter_10 - PowerPoint PPT Presentation

1 / 56
About This Presentation
Title:

Field_2005_chapter_10

Description:

When there is just 1 independent dummy variable that compares ... is said to transform supposedly 'ugly' people into beauties - until the morning after. ... – PowerPoint PPT presentation

Number of Views:66
Avg rating:3.0/5.0
Slides: 57
Provided by: iiMet
Category:

less

Transcript and Presenter's Notes

Title: Field_2005_chapter_10


1
Field_2005_chapter_10
  • Factorial ANOVA (GLM 3)?

2
When do you apply a factorial ANOVA?
  • When there is just 1 independent dummy variable
    that compares between two groups we apply a
    simple independent t-test. When there are more
    groups, we apply a 1-way ANOVA.
  • When there is 1 independent dummy variable and
    one continuous variable that we haven't
    manipulated but which we nevertheless have
    measured, we apply an ANCOVA
  • When there are 2 or more independent dummy
    variables, we apply a factorial ANOVA.

3
What kinds of factorial ANOVAs are there?
  • The independent variables are also called
    factors.
  • (1) Independent factorial design There are
    several independent variables or predictors each
    of which has been measured using different
    subjects (between groups)?
  • (2) Related factorial design The same
    participants have been used in all conditions
    (within groups, repeated measures)?
  • (3) Mixed design Several factors have been
    measured, some between, some within groups

4
How to call an ANOVA?
Participants
  • Different participants?
  • Independent measures
  • Same participants?
  • Repeated measures

How many independent variables/ factors?
1-way
2-way
3-way...
... n-way
Name A -way ?dependent ANOVA
  • A two-way repeated ANOVA 2 variables, repeated
    measures
  • A three-way independent ANOVA 3 variables,
    independent measures
  • A two-way mixed ANOVA 2 variables, one
    repeated, one independent measures

5
Example of a 2-way independent ANOVA(using
goggles.sav)?
  • Research Q Effects of alcohol on mate selection
    at night-clubs. Is there a beer goggles
    effect?
  • The drink-fuelled phenomenon is said to
    transform supposedly "ugly" people into beauties
    - until the morning after.
  • 2 independent variables/factors
  • 1. Alcohol dose (none, 2 pints, 4 pints)?
  • 2. Sex (men, women)?
  • 1 dependent variable
  • Attractiveness rating by a group of independent
    judges

http//news.bbc.co.uk/1/hi/england/manchester/4468
884.stm
6
The data(goggles.sav)?
  • Is the attractiveness rating dependent on
  • Amount of alcohol consumed (Main effect Alcohol)?
  • Sex (Main effect Sex)?
  • Combination of both (Interaction AlcoholSex)?

7
Breaking down the Total sum of squares (SST)
SST, total variance
SSM Model variance
SSR Unexplained variance
SSA First Indep Var (sex)
SSB Second Indep Var (alcohol)?
SSAxB Interaction first and second variable
  • What does the interaction mean?
  • ? That the attractiveness rating is dependent on
    a particular combination of the values of the two
    indep Var, e.g.,
  • it rises in females having drunk 2 pints of
    alcohol or
  • it declines in males having drunk 4 pints of
    alcohol

8
Sum of squares SST
Grand variance
df
  • SST s2grand (N-1)?
  • SST 190.76 (48-1)?
  • SST 8966.66
  • A total of 8966.66 variance units has to be
    explained.

9
Model sum of squares SSM
N of subj in each group 8
Kth group (out of 6 groups)?
Grand mean 58.33
  • SSM ???nk (?xk ?xgrand)2
  • SSM 8(60.625-58,33)2 8(66.875 58.33)2
    8(62.5 58.33)2 8(66.875 58.33)2 8(57.5
    58.33)2 8(35.625 58.33)2
  • SSM 5479.167
  • ? The model (2 indep. variables, sex and alcohol
    dose) can explain 5479.167 out of 8966.66 units
    of variance.

df of the model 6 1 5 (6 groups)?
10
Breaking down the variance of the model(1) Main
effect of gender (SSA)?
N 24 (There are 24 males and 24 females in
both groups)?
K 2 (2 sexes)?
  • SSA??nk(?xk ?xgrand)2
  • SSA 24(60.21-58.33)2 24(56.46-58.33)2
  • SSA 168.75
  • The factor 'gender' can explain 168.75 units of
    the model variance of 5479.167 (SSM).

df 1 (2 groups - 1)?
11
Breaking down the variance of the model(2) Main
effect of alcohol (SSB)?
N 16 (There are 16 subjects in the three
groups)?
K 3 (3 levels of alcohol)?
  • SSB??nk(?xk ?xgrand)2
  • SSB 16(63.75-58.33)2 16(64.69-58.33)2
  • 16(46.56-58.33)2
  • SSB 3332.292
  • The factor 'alcohol' can explain 3332.292 units
    of variance of the model variance of 5479.167
    (SSM).

df 2 (3 groups - 1)?
12
Breaking down the variance of the model(3)
Interaction sexalcohol (SSAxB)?
  • SSAxB SSM - SSA - SSB
  • SSAxB 5479.157 168.75 3332.292
  • SSAxB 1978.125
  • The interaction can explain 1978.125 units of
    variance of the model variance of 5479.167
    (SSM).

dfAxB 2 (dfM dfA dfB)?
13
The Residual Sum of Squares (SSR)?
  • SSR SST SSM
  • SSR 8966.66 5479.167
  • SSR 3487.52

Df 6 x 7 42 (6 groups) x (n-17 subjects)?
14
Summary Sum of squares
  • SST SSM SSR
  • SSM SSA SSB SSAxB
  • 8966.66 (168.75 3332.292 1978.125)
    3487.52
  • total var sex alcohol sexalcohol residual

15
Mean squares
  • The MS (mean squares) of each variance part are
    calculated by dividing the respective SS (sum of
    squares) by the respective df's
  • MSA SSA 168.75 168.75
  • dfA 1
  • MSB SSB 3332.292 1666.146
  • dfB 2
  • MSAxB SSAxB 1978.125 989.062
  • dfAxB 2
  • MSR SSR 3487.52 83.036
  • dfR 42

sex
alcohol
Sex x alcohol
16
F-ratios
  • The F-ratios for each effect are calculated by
    dividing the respective MS (mean squares) by the
    MSR
  • FA MSA 168.75 2.032
  • MSR 83.036
  • FB MSB 1666.146 20.065
  • MSR 83.036
  • FAxB SSAxB 989.062 11.911
  • MSR 83.036
  • These F-ratios have to be compared against
    critical values for their respective df's and the
    chosen level of significance.

sex
alcohol
Sex x alcohol
17
Between-group Factorial ANOVA using SPSS(using
goggles.sav)?
  • For each independent variable, create a dummy
    variable
  • 0male 1female
  • 1no alcohol 22 pints 34 pints
  • Levels of a between-group variable go in a single
    column (1 column for gender 1 column for
    alcohol)?
  • The third column is for the dependent Var
    (attractiveness rating)?

18
Analyze ? General Linear Model ? Univariate...
  • By default, SPSS runs a 'full factorial analysis'
    (including main effects for all indep Var and
    their interaction(s))?
  • By accessing 'Model', you can customize the model.

Gender and alcohol are 'fixed factors' (F). A
fixed factor is one which contains all the levels
of your variable to which you want to generalize.
Gender has only 2 levels, so it is F anyway.
'Alocohol' has certainly more levels, so could
also be a 'random factor' (R). A 'random factor'
is one which contains only a sample of possible
levels of your variable
Gender and alcohol are 'fixed factors' (F). A
fixed factor is one which contains all the levels
of your variable to which you want to generalize.
Gender has only 2 levels, so it is F anyway.
'Alocohol' has certainly more levels, so could
also be a 'random factor' (R). A 'random factor'
is one which contains only a sample of possible
levels of your variable
Covariate Any quantitative Var that you have
measured (but not experimentally manipulated)
which might have a relation to the dependent
variable ? ANCOVA, chapter_9
19
The 'Model' box
Otherwise, you can specify yourself
which effects you want SPSS to calculate. Here,
both main effects and their interaction are
requested - which makes it tantamount to a full
factoral design
Per default, a Full Factorial model is run
Type I,II, and III refer to different ways
of calculating the SS. SPSS uses Type III which
is invariant to cell frequencies
First, select 'Main effects' from Build
terms and confer 'gender' and 'alcohol' to the
Model window Second, select 'Interaction' and
confer 'gender' and 'alcohol' again to the
Model window.
20
Graphing interactions? Plots
Carry alcohol to the Horizontal axis window
and gender to the separate lines
window. (You could also do it the other way
round. In our case, the plot will plot the 3
value of the variable alcohol for the 2 values
of the variable gender.)?
If you had 3 variables, you may want to see the
various interactions in separate plots. In our
case with 2 variables, only a single plot will
be generated.
  • ? The resulting interactions graph helps
    interpreting the interaction between the two
    factors.

21
Contrasts for alcohol
  • SPSS has a couple of standard contrasts for the
    Main effects.
  • Gender has only 2 values, so needs no extra
    contrasts.
  • Alcohol has 3 values. In order to break this
    variance up, we will be using the 'Helmert'
    contrast

SS Alcohol
No alcohol
alcohol
2 pints
4 pints
Remember from chapter_8 With 'Contrasts' you can
break down the overall Model variance SSM into
smaller chunks of variation
22
Contrasts for alcohol? Contrasts
1. Select Helmert
2. Click on Change so that alcohol above is
specified for Helmert
  • Note we can only specify contrasts for the main
    effects. Contrasts for the interaction(s) have to
    be specified via syntax (see additional material
    on the CD ContrastsUsingSyntax.pdf)?

23
Post hoc tests? Post Hoc
Carry 'alcohol' to the 'post hoc' window
  • Again, we do not need post hoc tests for
    gender, only for alcohol. Tick those post hoc
    tests which we had discussed in chapter_8.
  • Remember Actually, you should choose either
    'contrasts' OR 'post hoc tests' but not both...

24
Options? Options
Carry the two factors and the interaction term to
the Display window (actually, the same
as choosing 'Overall')?
'Descriptive statistcs' gives you the mean, SD,
N, range, CI... The homogeneity test (Levene's
test) checks the assumption of equal
variancesbetween the groups
  • Now you have specified everything ? OK

25
Output from Factorial ANOVADescriptives
The Dep Var declines in the 4-pint cond for the
males
The Dep Var does not decline for the females
  • The descriptives are useful for interpreting the
    direction of the effects later. You may already
    see a trend, simply by looking at the data.

26
Levene's test for homogeneity of variances
df 1 k groups 1 6-15
df 2 n subjects k 48-642
Levene's test is n.s. ? The variances in all
subgroups are equal
27
The main ANOVA table
n.s.
  • ? No Main effect gender Overall, gender does not
    influence the Dep Var
  • ? Main effect alcohol Overall, alcohol
    influenced the Dep Var
  • ? Interaction The effect of the variable
    alcohol depends on the variable gender

28
Bar graphs for the main effect of alcohol(with
excel)?
  • The graphs for the 3 conditions of acohol show
    that the main effect is probably effected by the
    3rd condition after 4 pints the attractiveness
    of the mate drops abruptly

29
Bar graphs for the main effect of alcohol(with
SPSS)?
How do you get those graphs? Double-click on you
output table 2. Alcohol consumption,
high- light the three means (63,75/
64,688/ 46,56) and make a right mouse- click.
Select Create Graph ? Bar (You can further edit
the graph by double clicking on the bars. If you
are lucky, your version can also add the SE-bars,
mine cannot)?
How do you get those graphs? Double-click on your
output table 2. Alcohol consumption,
high- light the three means (63,75/
64,688/ 46,56) and make a right mouse- click.
Select Create Graph ? Bar (You can further edit
the graph by double clicking on the bars. If you
are lucky, your version can also add the SE-bars,
mine cannot)?
30
No Main effect gender
For the graph, again double click on the output
1. Gender, highlight the two mean values, make a
right mouse-click, select 'create graph' ? Bar
  • From the bar graph it can be seen that there is
    no main effect of gender.

31
Interaction graph genderalcohol
  • There is an interaction
  • For males who have drunken 4 pints, considerably
    less attractive mates are acceptable.

32
Contrasts (Helmert) Breaking down the effect of
alcohol
?X of no alcohol minus ?X of both
acohol groups 63.75 -55.625 8.125 55.625
(64.69-46.56)/2
No acohol vs. both alcohol groups

?X of 2 pints minus ?X of 4 pints group 64.69-46.
56 18.13
2 pints vs 4 pints
  • 1st contrast Combined effect of alcohol
  • 2nd contrast Specific effect of 4 pints

33
Post hoc analysis
  • The post hoc analysis breaks down the effect of
    alcohol. It is like a one-way ANOVA on 'alcohol'.

Both post hoc tests say the same There is NO
difference between 'no alcohol' and '2 pints'
however, there is a difference between 'no
alcohol' and '4 pints' as well as between '2
pints' and '4 pints'
34
Restriction on contrasts and post hoc tests
  • Both contrasts and post hoc tests only partition
    the main effect, NOT the interaction.
  • If you want to look at the interaction more
    closely, you have to conduct simple effects
    analysis.

35
Homogeneous subsets
SPSS creates subsets of groups with similar
means, here 'no alcohol' and '2 pints'. Within
those groups, there is ns difference
36
Summary of effects
  • Main effect alcohol Overall, alcohol has an
    effect on the attractiveness of the mate
  • No main effect gender Overall, gender has no
    effect on the attractiveness of the mate
  • Specific effects only after 4 pints, but not
    after 2 pints, there is an effect ? beer goggles
    effect
  • Interaction alcoholgender The beer goggles
    effect only holds for male subjects.

37
Simple effect analysis on the interaction term
looks at the effect of one independent variable
at individual levels of the other independent
variable.They can only be run with syntax? Open
GogglesSimpleEffects.sps
  • Simple effect analysis
  • (using GogglesSimpleEffects.sps)?

? Click RUN
38
Output of simple effects MANOVA
No alc No diff betw gender
2 pints No diff betw gender
4 pints Diff betw gender!
No alc No diff betw gender
2 pints No diff betw gender
4 pints Diff betw gender!
39
Interpreting Interaction graphs
Main effect of alcohol Interaction alcgender
Main effect of alcohol Interaction alcgender
Only Interaction alcgender
  • Non-parallel lines indicate possible interactions
  • Crossing lines are also indicative
  • But only the ANOVA can confirm whether an
    interaction is significant

40
Looking for interactions in bar charts A
B C D
C and D are different data from A and B. They
show NO inter- action. In both plots,
the differences of the dep var are parallel for
alcohol (C)? and gender (D) on the other
factor, respectively
Aand B show the same data, plotted for alcohol or
for gender. These two bar charts do show an
interaction for one level in one factor the
dep var suddenly drops down
INTERACTION
NO INTERACTION
41
Calculating the effect sizes
  • The effect sizes for the three effects
  • A main effect alcohol
  • B main effect gender
  • C interaction alcgender
  • can be calculated from the variance components of
    the respective effects

42
Calculating the effect sizes cont.
a of levels of variable A b of levels of
variable B n number of subjects per condition
  • ???? (a-1) (MSA - MSR)
  • nab
  • ???? (b-1) (MSB - MSR)
  • nab
  • ????? (c-1) (MSB - MSR)
  • nab

variable A gender variable B alcohol
43
Calculating the effect sizes cont.
a of levels of variable A b of levels of
variable B n number of subjects per condition
  • ???? (3-1) (1666,146 83,036) 65.96
  • 8x3x2
  • ???? (2-1) (168,75 - 83,036) 1.79
  • 8x3x2
  • ????? (3-1) (989,062 - 83,036) 37.75
  • 8x3x2

variable A alcohol variable B gender
44
Calculating the effect sizes cont. Total
variance estimate
  • ??total?????????????? ????? MSR
  • 65.96 1.79 37.75 83.04
  • 188.54
  • The single effect sizes are the variance
    estimates of the respective effect divided by the
    total variance estimate.

45
Calculating the effect sizes cont.
  • The single effect sizes are the variance
    estimates of the respective effect divided by the
    total variance estimate.
  • ?2effect ??efffect /???total?
  • ?2alcohol ??alcohol/?????total? 65.96 /
    188.54 .35 ?
  • ????
  • ?2gender ?2gender /????total??
    1.79/?????188.54 .009
  • ????
  • ?2alc x gender ??alc xgender?????total???
    37.75/188.54 .20

46
Calculating the effect sizes cont.
  • Now the ?2 values have to be multiplied by the
    square root so as to receive simple ?'s
  • ?alcohol ? .35 .59 ? large effect??
  • ??????
  • ?gender ? .009????? .09 ? tiny effect
  • ????????
  • ??alc x gender ? .20 .45 ? large effect
  • ?????????

47
Calculating the effect sizes for the simple
effects
  • For the simple effects, only two parts of the
    variance were compared, hence the df 's are
    always 1.
  • For the simple effects, the F-values can be
    converted into r by the following equation
  • r ? F(1, dfR)
  • F (1,dfR) dfR

48
Calculating the effect sizes for the simple
effects
  • rgender (no alc) ? 1.01 .15
  • 1.01 44
  • rgender ( 2 pints) ? 0.49 .10
  • 0.49 44
  • rgender ( 4 pints) ? 12.35 .47
  • 12.35 44

Small effect
Small effect
Large effect
49
Reporting the results of 2-way ANOVA
(schematically)?
  • 1. Significant main effect of 'alcohol', F (2,
    42) 20.07, p
  • 2. Non-significant main effect of 'gender', F (1,
    42) 2.03, p .161, ?2 .009.
  • 3. Interaction alcoholgender, F (2, 42) 11.91,
    p affected differently by alcohol.
  • Attractiveness of partners was similar in males
    (M 66.88, SD 10.33) and females (M 60.63, SD
    4.96) after no alcohol. Attractiveness was also
    similar for males (M 66.88 SD 12.52) and
    females (M 62.50, SD 6.55) after 2 pints.
    However, attractiveness of partners was
    significantly lower for males (M 35.63 SD
    10.84) than for females (M 57.5, SD 7.07)
    after 4 pints.

50
Factorial ANOVA as regression(simplifying the
model to only 2 levels of alcohol none and 4
pints)?
  • Outcomei (Modeli) errori
  • Attractivei (b0 b1Ai b2Bi b3ABi) ?i
  • Attractivei (b0 b1Genderi b2Alcoholi
    b3Interaction) ?i
  • How is the interaction represented? As b3. It is
    a literal product of both variables, AxB.

51
Coding scheme for factorial ANOVA
  • The interaction is the product of the dummy
    variables for Gender x alcohol

52
Factorial ANOVA as regression(simplifying the
model to only 2 levels of alcohol none and 4
pints)?
  • With our regression model, we can predict values
    of the dep var. Let's take men with no alcohol
  • Attractivei (b0 b1Genderi b2Alcoholi
    b3Interaction) ?i
  • ?X Men, None b0 (b1 x 0) (b2 x 0) (b3 x
    0)?
  • b0 ?X Men, None
  • b0 66.875
  • ? The constant in the model represents the mean
    of the group with only zero's in the coding
    scheme, here, men with no alcohol.

53
Factorial ANOVA as regression(simplifying the
model to only 2 levels of alcohol none and 4
pints)?
  • Consider women with no alcohol
  • ?X Women, none b0 (b1 x 1) (b2 x 0) (b3
    x 0)?
  • ?X Women, none X Men, None b1
  • b1 ?X Women, None - ?X Men, None
  • b1 60.625 66.875
  • b1 -6.25

b1 difference between (male, no alc) and
(female, no alc)?
54
Factorial ANOVA as regression(simplifying the
model to only 2 levels of alcohol none and 4
pints)?
  • Consider men with 4 pints
  • ?X Men, 4 Pints b0 (b1 x 0) (b2 x 1) (b3
    x 0)?
  • b0 ?X Men, None b2
  • b2 ?X Men, 4 Pints - ?X Men, None
  • b2 35.625 66.875
  • b2 - 31.25
  • ? b2 represents the difference between having no
    alcohol and having 4 pints in men.

55
Factorial ANOVA as regression(simplifying the
model to only 2 levels of alcohol none and 4
pints)?
  • Consider females with 4 pints
  • ?X Women, 4 Pints b0 (b1 x 1) (b2 x 1)
    (b3 x 1)?
  • b0 b1 b2 b3
  • b3 ?X Men, None (?X Women??4 Pints?? Men,
    None )
  • ?X Men, 4 pints - ?X Men, None ) b3
  • ?X Men, None - ?X Women??none?? ?X Women??4
    Pints???X Men, 4 pints
  • b3 66.875 60.625 57.5 - 35.625
  • b3 28.125
  • ? The interaction looks at the
  • effect of alcohol in men compared to women

56
Running ANOVA as a regression(using
GogglesRegression.sav)?
Analyze ? regression ? Linear Dep Var
Attractiveness of Date Independent Variables
Gender, Alcohol, Interaction dummies
Gender n.s alcohol interaction
Gender n.s alcohol interaction
Gender n.s alcohol interaction
Same coefficients as we calculated!
Write a Comment
User Comments (0)
About PowerShow.com