Академический Документы
Профессиональный Документы
Культура Документы
Assumptions:
Observations yij are independent.
eij are normally distributed with mean zero and
constant standard deviation.
One-way analysis of Variance
Hypothesis:
Ho: Means of all groups are equal.
Ha: At least one of them is not equal to other.
Analysis of variance (ANOVA) Table for one
way classified data
Sources of Sum of df Mean Sum F-Ratio
Variation Squares of Squares
Group SSG k-1 MSG= F=
SSG/k-1 MSG/MSE
Error SSE n-k MSE=
SSE/n-k
Total SST n-1
Multiple comparisons
If the F test is significant in ANOVA
table, then we intend to find the pairs of
groups are significantly different.
Following are the commonly used
procedures:
Fisher’s Least Significant Difference (LSD)
Tukey’s method
Bonferroni’s method
Scheffe’s method
One-way ANOVA - Demo
MS Excel:
Put response data (hgt) for each groups (grp) in
side by side columns (see next slides)
Select Tools/Data Analysis and select Anova:
Single Factor from the Analysis Tools list. Click
OK.
Select Input Range (for our example a1: c21), mark
on Group by columns and again mark labels in first
row.
Select output range and then click on ok.
One-way ANOVA MS-Excel Data
Layout
grp1 grp2
52.50647 47.
43.14426 43.
55.91853 40.
One-way ANOVA MS-Excel output:
height on treatment groups
Anova: Single F
SUMMARY
One-way ANOVA - Demo
SPSS:
Select Analyze > Compare Means > One –
Way ANOVA
Select variables as Dependent List: response
(hgt), and Factor: Group (grp) and then make
selections as follows-click on Post Hoc and
select Multiple comparisons (LSD, Tukey,
Bonferroni, or Scheffe), click options and
select Homogeneity of variance test, click
continue and then Ok.
One-way ANOVA SPSS output:
height on treatment groups
ANOVA
hgt
One-way ANOVA R output: height
on treatment groups
>grp<- as.factor(grp)
> summary(aov(hgt~grp))
Df Sum Sq Mean Sq F value Pr(>F)
grp 2 19.16 9.58 0.2803 0.7566
Residuals 57 1947.55 34.17
Analysis of variance of factorial
experiment (Two or more factors)
Factorial experiment: The effects of the
two or more factors including their
interactions are investigated
simultaneously. For example, consider
two factors A and B. Then total variation
of the response will be split into
variation for A, variation for B, variation
for their interaction AB, and variation
due to error.
Analysis of variance of factorial
experiment (Two or more factors)
Model with two factors (A, B) and their
interactions:
yijk = µ + α i + β j + (α β) ij + eijk
µ is the general mean
αi is the effect of ith level of the factor A
β j is the effect of jth level of the factor B
(αβ)ij is the interaction effect of ith level A and jth level of B
eijk is the error
Assumptions: The same as in One-way ANOVA.
Analysis of variance of factorial
experiment (Two or more factors)
Null Hypotheses:
Hoa: Means of all groups of the factor A
are equal.
Hob: Means of all groups of the factor B
are equal.
Hoab:(αβ)ij = 0, i. e. two factors A and B
are independent
Analysis of variance of factorial
experiment (Two or more factors)
ANOVA for two factors A and B with their
interaction AB.
Two-factor with replication - Demo
MS Excel:
Put response data for two factors like in a lay out like in
the next page.
Select Tools/Data Analysis and select Anova: Two
Factor with replication from the Analysis Tools list.
Click OK.
Select Input Range and input the rows per sample:
Number of replications (excel needs equal replications
for every levels). Replication is 2 for the data in the next
page.
Select output range and then click on ok.
Two-factor ANOVA MS-Excel Data
Layout:
shade1
shade1
shade1
Two-factor ANOVA MS-Excel
output: height on treatment group,
shades, and their interaction
Anova: Two-Factor W
SUMMARYgrp1
shade1
Count 1
Two-factor ANOVA - Demo
SPSS:
Select Analyze > General Linear Model > Univariate
Make selection of variables e.g. Dependent
varaiable: response (hgt), and Fixed Factor: grp and
shades.
Make other selections as follows-click on Post Hoc
and select Multiple comparisons (LSD, Tukey,
Bonferroni, or Scheffe), click options and select
Homogeneity of variance test, click continue and
then Ok.
Two-factor ANOVA SPSS output:
height on treatment group, shades,
and their interaction
Between-Subjects
grp 1
Two-factor ANOVA R output: height
on treatment group, shades, and
their interaction
> grp<- as.factor(grp)
> shades<-as.factor(shades)
> summary(aov(hgt~grp+shades+grp*shades))
Df Sum Sq Mean Sq F value Pr(>F)
grp 2 19.16 9.58 0.2703 0.7642
shades 1 14.76 14.76 0.4165 0.5214
grp:shades 2 18.96 9.48 0.2674 0.7663
Residuals 54 1913.83 35.44