Professional Documents
Culture Documents
1 Anova
1 Anova
By
Hirbo Shore (MPH, Assistant Professor)
School of Public Health, CHMS-HU
hamakiya@gmail.com
1
Course objective
• At the end of the course students will be able to:
– Describe the relationship between two or more variables
2
Course contents
1. Chapter One: Analysis of Continuous Data
3
Methods Instruction
• Lecture
• In-class exercise
• Take-home assignments
• Independent reading
4
Evaluation
• Class participation
• Assignment
• Final examination
5
References
1. Pagano M and Gabuvereau K. Principles of Biostatistics, 2nd Edition
2. Wayne W. Daniel. Biostatistics; A Foundation for Analysis in the Health
Sciences
3. Eric Vittinghoff • David V. Glidden Stephen C. Shiboski Charles E.
McCulloch. Regression Methods in Biostatistics: Linear, Logistic,
Survival, and Repeated Measures Models
4. Hubert Gatignon. Statistical Analysis of Management Data, Third
Edition.
5. Scott M.Lynch. Using Statistics in Social Research: A Concise Approach
6
Statistical methods for continuous
data
7
Comparison of two groups
• The statistical idea used in the test of hypotheses share the
roots with those used in confidence interval
8
Comparison of two groups,…
9
Comparison of two groups,…
• Hypothesis testing for the difference of two means
• Assumptions
– The two populations are normally distributed
10
Comparison of two groups,…
• Difference of Two Independent Means
• Assumptions
11
Comparison of two groups,…
• Difference of Two Independent Means
– Normality assumption
• The underlying population distributions are approximately
normally distributed is fairly robust.
12
Comparison of two groups,…
• Difference of Two Independent Means
– Known variance
H0: µ1-µ1 = 0
H1: µ1-µ1 ≠ 0
Test statistics
ഥ 1−𝑥
𝑥 ഥ 2 −∆0
𝑍=
𝜎12 𝜎22
+
𝑛1 𝑛2
13
Comparison of two groups,…
• Difference of Two Independent Means
– Unknown but equal population variance
14
Example
• To compute mean,
stata command: bysort sex: sum Blood_gluc (I used metsyn data)
n1=280
n2=567
𝑥ҧ 1=121.8464
𝑥ҧ 2=120.3475
Sp=2594.8194
display ((279)*53.33543^2+(566)*49.7158^2)/(279+566)=2594.8194
15
Example
• E.g Stata command; ttest v1, by(catvar)
ttest Blood_gluc, by(sex)
16
Comparison of two groups,…
• Difference of Two Independent Means
– Unknown and unequal population variance
– The degrees of freedom for this test are not the usual n1 +
n2 - 2
𝑥ҧ 1−𝑥ҧ 2
– Test statistics t’= , with df=f
𝑆𝑃2 𝑆𝑃2
𝑛1
+𝑛
2
𝑠12 𝑠22
( 𝑛1 + 𝑛2 )
f= 𝑠2 𝑠22
( 𝑛1 )/𝑛1−1+( 𝑛 )/𝑛2−1
1 2
17
Comparison of two groups,…
• E.g., ttest d4, by(sex) unequal
18
Comparison of two groups,…
• Two dependent means
Assumptions
– The population of difference scores is normally distributed.
– The two samples are dependent (e.g. before and after, pairs
of knees)
– Each sample is obtained using independent random
sampling.
19
Comparison of two groups,…
• Two dependent means
• Start by calculating the difference scores for each pair and
• then perform a t-test on the new variable
• Hypothesis
Ho: µd=µdo, H1: µd ≠ µdo
• Test statistics
ഥ
𝑑−𝜇
t= 𝑑𝑜
𝑆𝑑/ 𝑛
20
Example: paired test
• Using data of blood pressure measurement before and after intervention
• Stata COMMAND
– ttest bp_before== bp_after
21
ANOVA
22
Comparison of more than two groups
• The hypothesis to be tested for k means (k≥2)
H0: µ1=µ2=µ3=…µk
• All population means are equal or
• No treatment effect
H1: Not all of the population means are the same
• At least one population mean is different
• There is a treatment effect
– Note: doesn’t mean that all means are different or some
pairs may be the same
23
Comparison of more than two groups,…
– If we reject null hypothesis, we cannot conclude that at
least one population mean doesn’t equal another population
mean
25
Comparison of more than two groups,…
– The overall error =1-(1-α)k, where α is the significancy
level and k is the number of significancy tests the can be
done
1-(1-0.05)6=0.265
26
ANOVA,…
• The technique whereby the total variation present in the data
set is partitioned into several component
27
ANOVA,…
• Purpose of ANOVA
– To estimate and test hypotheses about population variances
28
ANOVA,…
30
ANOVA
• Definition 3
– Factor levels
• Definition 4
– Experimental unit
31
One-way ANOVA
32
One way ANOVA
• The simplest type of analysis of variance
• Assumption
– Data constitute independent random sample from the respective
populations
33
One way ANOVA,…
Never Previous recent
disclosed disclosed disclosed
34
One way ANOVA,…
35
One way ANOVA,…
• Hypothesis Testing Steps
Step 1. Description of data
– The measurements resulting from a completely randomized
experimental design, along with the means and totals that can be
computed from them
36
One way ANOVA,…
• Step 2. Assumption
– The Model
37
One way ANOVA,…
2. a treatment effect
38
One way ANOVA,…
39
Oneway ANOVA,…
• Step 3: Hypotheses
– 𝐻0 : the means for the k groups are equal
𝜇1 = 𝜇2 = ⋯ = 𝜇𝑘
– 𝐻1 : at least one of the means is different from the others
– Step 4. test statistics
• The test statistic for one-way analysis of variance is a
computed variance ratio(V.R)
Variance 𝑏𝑒𝑡𝑤𝑒𝑒𝑛
Variance Ratio= Variance 𝑤𝑖𝑡ℎ𝑖𝑛 = F
40
Oneway ANOVA,…
• F-statistic is compared to an F-distribution which has two
degrees-of-freedom parameters df1 and df2
• df1 = k − 1,
df2 = n − k
(where k=#groups and
n=sample size)
F=t2
One-way ANOVA,…
• Step 5. Distribution of test statistic
42
One-way ANOVA,…
• If calculated F>F tabulated→ reject H0
43
One-way ANOVA,…
• Step 7. Calculation of test statistic
– Partitioning of the total variation present in the observed data into its
basic components, each of which is attributable to an identifiable
source
44
One- way ANOVA…
• Between-group sum squares (SSB)
SSB=
• Within-group sum of squares(SSW)
45
One-way ANOVA…
• Between groups degree of freedom
df = k-1
46
One-way ANOVA,…
• Mean Square
– When we divide the sum of squares (SS) by its degrees of freedom (df),
we obtain what is called mean square (MS)
47
One-way ANOVA, …
• Between-group mean square (MSB)
MSB=𝑆𝑆𝐵
𝑘−1
MSW=𝑆𝑆𝑊
𝑛−𝑘
48
One-way ANOVA,…
49
One-way ANOVA,…
Treatment 1 Treatment 2 Treatment 3 Treatment 4
y11 y21 y31 y41
ഥ𝟏 = 𝒚𝟏𝒋
𝒚 ഥ𝟐 = 𝒚𝟐𝒋
𝒚 ഥ𝟑 = 𝒚𝟑𝒋
𝒚 ഥ𝟒 = 𝒚𝟒𝒋
𝒚
𝒋=𝟏 𝒋=𝟏 𝒋=𝟏 𝒋=𝟏
𝟏𝟎 𝟏𝟎 𝟏𝟎 𝟏𝟎
ഥ𝟏)2/10 − 1 + 𝒚𝟐𝒊 − 𝒚
(y1𝑖 − 𝒚 ഥ𝟐 𝟐 /𝒏 − 𝟏) + (y3i − 𝒚
ഥ3)2/10 − 1 + 𝒚𝟒𝒊 − 𝒚
ഥ𝟒 𝟐 /𝒏 − 𝟏)
𝒋=𝟏 𝒋=𝟏 𝒋=𝟏 𝒋=𝟏
50
One-way ANOVA,…
• Height (in inches) of children with four different groups
Group 1 Group 2 Group 3 Group 4
60 50 48 47
67 52 49 67
42 43 50 54
67 67 55 67
56 67 56 68
62 59 61 65
64 67 61 65
59 64 60 56
72 63 59 60
71 65 64 65
51
One-way ANOVA,…
• Hypothesis testing
1. Data generated from randomly selected group
2. H0: μgr1=μgr2=μgr3=μgr4
H1: at least one of the means is different from the others
3. Statistics: Variance Ratio
4. Distribution of test statistic
Numerator df= 4-1=3
Denumerator df=40-4=36
α=5%
52
ANOVA model
Height (in inches) of children with four different groups
53
• SSW=(60-62)2+(67-62)2+(42-62)2+…+(72-62)2 + (50- 59.7)2
(5259.7)2 + (43-59.7)2+…(65-59.7)2+ (48-56.3)2+(49-
56.3)2 +(5056.3)2 +…+ (64-56.3)2+(47-61.4)2+(67-
61.4)2+(54-61.4)2+…+(65-61.4)2
=2060.6
54
ANOVA model
• Calculate the sum squares within group
MSB=196.5
3
=65.5 𝑀𝑆𝐵
F=𝑀𝑆𝑊 , with df=(k-1, n-k)
MSW=2060.6
36
=57.24 65.5
F=57.24 =1.1443269
Decision: since calculated F <tabulated F
55
ANOVA model
5. Rejection rule
calculated F>F tabulated→ reject H0
56
Model using stata
• Descriptive statistics
57
Assessing normality
• Shapiro-Wilk Test (Ho: Distribution is normal)
• P-value > α indicates that we cannot reject a H0: that the data
are from a normally distributed population
58
Assessing Homogeneity of Variances
• Bartlett’s test of Homogeneity of Variances
– Assume the variance are equal across sample subsamples,
or groups.
– it presumes that the distribution of the (dependent) variable
is normal
– P-value > α, indicate nots sufficient evidence to reject
H0: 𝜎12 = 𝜎22 =…. =𝜎𝑘2
59
Assessing Homogeneity of Variances
• Levene’s test for Equality of Variances
– Used when the data deviate from normality, and especially
in smaller samples
60
ANOVA model
• ANOVA table
– Stata command: oneway height group
61
ANOVA model
stata command: oneway height group, tabulate
62
ANOVA model
stata command: anova height group
63
Multiple comparison procedures
• Pairwise Comparisons in ANOVA
64
Multiple comparison procedures
65
Multiple comparison procedures
• If you didn’t specify the comparisons of interest ahead of time,
then you to pay a price for making all pairwise comparisons to
keep all types-I error rate to α
– Planned
– unplanned
66
Multiple comparison procedures
• Contrast
– A simple contrast hypothesis compares two population
means
• H0: µ1=µ4 , (special linear contrast)
– A complex contrast hypothesis has multiple population
means on either side
• H0: (µ1+µ1)/2=µ3
• H0: (µ1+µ2)/2=(µ3+µ4+µ5)/3
67
Multiple comparison procedures
• Planned comparisons
– Most statistical packages allow custom planned contrast
hypotheses
68
Multiple comparison procedures
• Conditions for planned comparisons
69
Multiple comparison procedures
• Unplanned comparisons(post-hoc test)
– Done when difference is noticed when looking at the
results
70
Multiple comparison procedures
71
Multiple comparison procedures
• Bonferroni methods
• Used for pairwise comparisons when the sample sizes of
the treatments are equal or not
• Adjust P-value by most conservative amount
– Divide P-value by the number of tests
• All pairwise difference(y1-y2) are compared against the
statistics
𝑀𝑆𝐵 𝑀𝑆𝑊
𝑡 𝛼 ,𝑛−𝑘 𝑛𝑖
+ 𝑛 , where C is total number of possible comparison
2𝑐 𝑗
72
Multiple comparison procedures
• Scheff’s test
– More general procedure for comparing all possible linear
combination of treatment means (contrasts)
73
Multiple comparison procedures
• Tukey’s Honestly Significant Difference(HSD), Equal sample size
– makes use of a single value against which all differences
are compared
74
Tukey’s Honestly Significant Difference(HSD), unequal
sample size
– Also known as Tukey-Kramer method
– All pairwise differences (𝑦ത𝐴 − 𝑦ത𝐵) are compared with the
statistics
ഥ 𝐴−𝑦
𝑦 ഥ𝐵
q= 𝑀𝑆𝑊 1 1
,
2
(𝑛 +𝑛 )
𝐴 𝐵
• where 𝑦ത𝐴𝑎𝑛𝑑 𝑦ത𝐵 are the two means being compared and
nA and nB are corresponding sample size
76
Multiple comparison procedures
• The critical value depends on αT the total risk of erroneously
asserting a difference for all comparisons combined, γd , the df
for MSW and parameter P, which is the number of means
being tested.
77
Examples
• stata command: oneway height group, bonferroni
78
Example…
oneway height group, scheff
79
Example…
oneway height group, sidak
80
Tukey’s test
81
Tukey’s test
82
Tukey’s Honestly Significant Difference(HSD)
83
The Newman-Keuls
84
Exercise
• In a study of 90 patients on renal dialysis, Farhad Atassi (47)
assessed oral home care practices. He collected data from 30
subjects who were in (1) dialysis for less than one year, (2)
dialysis for 1 to 3 years, arid dialysis for more than 3 years.
The following table shows plaque index scores for these
subjects A higher score indicates a greater amount of plaque.
Do analysis of variance, check assumption, pairwise
comparison. Use α=5%
85
Exercise,…
86
Two-way ANOVA
87
Two way ANOVA
• The technique for analyzing the data from a randomized
complete block design
88
Two way ANOVA
• If X1 has k levels and X2 m levels, then the analysis is referred
to as a k by m or k x m ANOVA
• Examle
IV-1 IV-2 DV
Disclosure status WHO Stages CD4 count
Type of exercise Types of diet Weight change
HP pt interaction types of services satisfaction score
89
Two way ANOVA
• Advantages
90
Two way ANOVA
Steps in two way anova
Step 1: Data.
Step 2: Assumptions.
91
Two way ANOVA
• The model
92
Two way ANOVA
Step 3: Hypothesis testing
H0: 𝜏𝑗(𝑡𝑟𝑒𝑎𝑡𝑚𝑒𝑛𝑡 𝑒𝑓𝑓𝑒𝑐𝑡) = 0
HA: at least 𝜏𝑗 ≠ 0
Step 4: Test statistic
– The test statistic is V.R.(variance Ratio)
Step 5: Distribution of test statistic
– When is true and the assumptions are met, V.R. follows an
F distribution.
Step 6: Decision rule
– Reject the null hypothesis if the computed value of the test statistic V.R.
is equal to or greater than the critical value of F.
93
Two way ANOVA
Step 7: Calculation of test statistic
– total sum of squares for the randomized complete block
design can be partitioned into three components, one each
attributable to treatments (SSTr ), blocks (SSBl ), and error
(SSE )
94
Two way ANOVA
• The formulas for the quantities
95
Two way ANOVA
• Step 8: Statistical decision
– When the null hypothesis is true, therefore, the quantity
MSTr/MSE is distributed as F with k-1 numerator degrees
of freedom and (n-1)(k-1) denominator degrees of freedom.
96
Two way ANOVA
• ANOVA Table for the Randomized Complete Block Design
97
Two way ANOVA
Step 9: Conclusion.
– If we reject we conclude that the alternative hypothesis is
true.
– If we fail to reject we conclude that may be true.
Step 10: p value.
– The following example illustrates the use of the
randomized complete block design.
98
Two way ANOVA
99
Two way ANOVA
• There are three sets of null hypothesis
1. The population means of the first factor are equal
2. The population means of the second factor are equal
3. There is no interaction between the two factor
– The main effect involves the independent variable at a time
– The interaction effect that one factor has on the other factor
100
Two way ANOVA
• Interaction effect
– If the interaction is significant, the model is called
interaction model
– If the interaction is not significant, the model is called an
additive model
• Interaction or profile plots
– Used to look at outcome of mean for two factors
– Parallel line suggest an additive model
– None parallel suggest interaction
– The plot should not be the deciding factors whether or not
to run the model
101
Two way ANOVA
• With variation
– The with variation is the sum of squares within each
treatment group
– The within variance is the within variation divided by its
degree of freedom
– The within group is called error
• Error assumption
– All errors are normally distributed
– All errors have expected value zero
– All errors have the same variance
– All errors are independent
102
Two way ANOVA
• Structure if analysis for a two-way ANOVA
Total variability
103
Two way ANOVA
• Example 1
– A physical therapist wished to compare three methods for
teaching patients to use a certain prosthetic device.
104
Two way ANOVA
• Solution
– The randomized complete block design is the
appropriate design for this physical therapist.
• Data:
– Three patients in each of five age groups were selected to
participate in the experiment, and one patient in each age
group was randomly assigned to each of the teaching
methods.
– The methods of instruction constitute our three treatments,
and the five age groups are the blocks
105
Two way ANOVA
• Assumptions
– We assume that each of the 15 observations constitutes a
simple random of size 1 from one of the 15 populations
defined by a block-treatment combination
106
Two way ANOVA
• Hypothesis testing
H0: 𝜏𝑗 = 0
HA: at least one 𝜏𝑗 ≠ 0
• Test statistic
– Variance ratio(V.R)=MSTr/MSE
• Distribution of test statistic
– When H0 is true and the assumptions are met, V.R. follows
an F distribution with 2 and 8 degrees of freedom
107
Two way ANOVA
• Decision rule
– Reject the null hypothesis if the computed V.R. is equal to
or greater than the critical F, to be 4.46 (from the table) or
stata command: display invF(2,8, 0.95)
• Calculation of test statistic.
– We compute the following sums of squares:
108
Two way ANOVA
• Statistical decision
– Since our computed variance ratio, 20.91, is greater than
4.46, we reject the null hypothesis of no treatment effects
• ANOVA table
109
Two way ANOVA
• Conclusion
– We conclude that not all treatment effects are equal to zero,
or equivalently, that not all treatment means are equal
• P-value
– For this test p-value<0.005
110
Two way ANOVA
111
Two way ANOVA
112
Two way ANOVA
• Exercise:
A remotivation team in a psychiatric hospital conducted an experiment to
compare five methods for remotivating patients. Patients were grouped
according to level of initial motivation. Patients in each group were randomly
assigned to the five methods. At the end of the experimental period the patients
were evaluated by a team composed of a psychiatrist, a psychologist, a nurse,
and a social worker, none of whom was aware of the method to which patients
had been assigned. The team assigned each patient a composite score as a
measure of his or her level of motivation
113
Two way ANOVA
• Data
114
Repeated measure ANOVA
115
Repeated measure ANOVA
– A repeated measures design is one in which measurements
of the same variable are made on each subject on two or
more different occasions
• Used in a repeated measures design is a desire to control for
variability among subjects
116
Repeated measure ANOVA
117
Repeated measure ANOVA
• Assumptions
1. The subjects under study constitute a simple random
sample from a population of similar subjects.
118
Repeated measure ANOVA
3. The kn populations have potentially different means, but
they all have the same variance.
4. The k treatments are fixed; that is, they are the only
treatments about which we have an interest in the current
situation. We do not wish to make inferences to some
larger collection of treatments.
119
Repeated measure ANOVA
• The Model
– The model for the fixed-effects additive single-factor
repeated measures design is
xij = µ + βi + τj + εij
i= 1, 2, …, n; j = 1, 2, ... , k
120
Repeated measure ANOVA
• Spherical assumption
– the variances of the differences between all combinations
of related groups (levels) are equal
121
Repeated measure ANOVA
• Violation of sphericity
– homogeneity of variances in a between-subjects ANOVA
122
Repeated measure ANOVA
• The correction is achieved by estimating the degree to which
sphericity has been violated and applying a correction factor to
the degrees of freedom of the F-distribution
• Example
123
• Looking at our results, at first glance, it would appear that the
variances between the paired differences are not equal
(13.9 vs. 17.4 vs. 3.1); the variance of the difference between Time
2 and Time 3 is much less than the other two combinations.
124
Testing for Sphericity
125
Testing for Sphericity
126
Testing for Sphericity
• Correction for violation of spherity assumption
– applied to the degrees of freedom (df), such that a valid
critical F-value can be obtained
– the degree to which sphericity is present, or not, is
represented by a statistic called epsilon (ε).
– An epsilon of ε = 1 indicates that the condition of
sphericity is exactly met.
– The further epsilon decreases below 1 (i.e., ε < 1), the
greater the violation of sphericity
127
Lower-Bound Estimate
• The lowest value that epsilon (ε) can take is called the lower-
bound estimate (or the lower-bound adjustment) and is
calculated as:
128
Lower-Bound Estimate
129
Greenhouse-Geisser Correction
df𝑒𝑟𝑟𝑜𝑟 = 𝜺ො (k-1)(n-1)
130
Huynd-Feldt Correction
df𝑒𝑟𝑟𝑜𝑟= 𝛆 (k-1)(n-1)
131
132
Repeated measure ANOVA
133
Repeated measure ANOVA
• Example 1
Researchers examined subjects with chronic, nonspecific low back pain. In this
study, 18 of the subjects completed a survey questionnaire assessing physical
functioning at baseline, and after 1, 3, and 6 months. Table below shows the
data for these subjects who received a sham treatment that appeared to be
genuine osteopathic manipulation. Higher values indicate better physical
functioning.
134
Repeated measure ANOVA
The goal of the experiment was to determine if subjects would report
improvement over time even though the treatment they received would provide
minimal improvement. We wish to know if there is a difference in the mean
survey values among the four points in time.
135
Data
136
Repeated measure ANOVA
• Solution:
1. Data
2. Assumptions. We assume that the assumptions for the fixed-effects,
additive single-factor repeated measures design are met.
3. Hypotheses.
H0 : µB = µM1 = µM3 = µM6
H0: not all µ’s are equal
4. Test statistic
V.R == treatment MS/error MS.
5. Distribution of test statistic
– F with 4-1=3 numerator degrees of freedom and 71-3-
17=51denominator degrees of freedom
137
Repeated measure ANOVA
• Degree of freedom
N=72, s=18, a=4
– df between=4-1=3
– dfwithin=N-a=72-4=68
– dfsubjects=18-1=17
– dferror=dfwithin-dfsubject=68-17=51
– dftotal=N-1=72-1=71
138
Repeated measure ANOVA
6. Decision rule.
• Let . The critical value of F is 2.80 (obtained by
interpolation). Reject if computed V.R. is equal to or
greater than 2.80.
7. Calculation of test statistic
139
Repeated measure ANOVA
140
Repeated measure ANOVA
• Example 2
– Researchers want to test a new anti-anxiety medication. they measured
the anxiety of 9 participants three times: once before taking the
medication, once one week after taking the medication, and once two
weeks after taking medication. Anxiety rated on a scale of 1-10, which
10 being “high anxiety” and 1 being “low anxiety. Are there any
difference between the three conditions using α=5%
141
Repeated measure ANOVA
• Steps
1. Data
2. Assumptions. We assume
that the assumptions for the
fixed-effects, additive
single-factor repeated
measures design are met.
3. Hypotheses.
H0: μbefore= μweek1= μweek2
HA: not all means are equal
142
Repeated measure ANOVA
4. Test statistic
V.R == treatment MS/error MS.
5. Distribution of test statistic
– F –statistics
– Calculating degree of freedom
N=27 S=9 a=3
– dfbetween=a-1=3-1=2
– dfwithin= N-a=27-3=24
– dfsubject= S-1=9-1=8
– dferror= dfwithin- dfsubject=24-8= 16
– dftotal=27-1=26
143
Repeated measure ANOVA
• Calculate test statisics4
σ σ 𝒂𝒊 𝟐 𝑻𝟐
• SSbetween= − , or
𝒔 𝑵
– Before sum=72, Week1 sum=61, Week2 sum=32
𝑻𝟐 𝟏𝟔𝟓𝟐
– T=165, = = 1008.33
𝑵 𝟐𝟕
𝟕𝟐𝟐+𝟔𝟏𝟐+𝟑𝟐𝟐 𝑻𝟐
– SSbetween= − =1103.22-1008.33=94.9
𝟗 𝑵
144
Repeated measure ANOVA
σ σ 𝒂 𝟐
• SSwithin=Y2- 𝒊
or
𝒔
σ 𝒀2=1127-1103.22=23.78
145
Repeated measure ANOVA
σ σ 𝒔𝒊 𝟐 𝑻 𝟐
• SSsubject= - or
𝒂 𝑵
Subject 1 sum =20, Subject 2 sum =17, Subject 2 sum =15
Subject 4 sum =18, Subject 5 sum =20, Subject 6 sum =19,
Subject 7 sum =16, Subject 8 sum =18, Subject 9 sum =22
σ σ 𝒔𝒊 𝟐 202+172+152+182+202+192+162+182+222
• = =1021
𝒂 3
σ σ 𝒔𝒊 𝟐 𝑻𝟐
• - =1021-1005.33=15.67
𝒂 𝑵
146
Repeated measure ANOVA
SS df MS F
SSbetween 94.9 2 47.45 93.61
SSwithin 23.78 24 0.991
SSsubject 15.67 8 1.96
Sserror 8.11 16 0.51
Total 118.68 26 4.5646154
SSerror=SSwithin-SSsubject
=23.78-15.67 =8.11
SSTotal=SSbetween+ Sswithin
=94.9+23.78=118.68
147
Repeated measure ANOVA
Msbetween=94.9/2=47.4
M𝑺error= 8.11/16=0.506875
47.45
F= = 93.612824
0.506875
148
Repeated measure ANOVA
• Stata output:
149
Repeated measure ANOVA
150
THANK YOU
FOR
THANK YOU
FOR
!!
THANK YOU FOR YOUR ATTENTION!!
151