anova and its application
TRANSCRIPT
ANOVA and its Applications
P GuruprasadSR, Pharmacology,AIIMS
March 20, 2015
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 1 / 18
Trial of 2 drugs for management of Hypertension
You are doing an investigator initiated trial to compare two recentlyintroduced drugs, alasartan and blasartan vs losartan (add on) for
management of hypertension. After ethics committee approval and takinginformed consent, you enroll 150 hypertensive subjects. Baseline SystolicBP is measured, and after randomization, medicines are precribed such
that the subjects are divided equally among the 3 groups. 3 months later,Systolic BP is measured again.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 2 / 18
Data of trial on Hypertension
The following table displays the summary of our primaryoutcome(difference in Systolic BP) across the groups.
Losartan Grp Alasartan Grp Blasartan Grp
Mean 4.958713 7.7409001 7.4445712SD 1.0484026 1.0708933 1.0665367Median 4.7990277 7.6193942 7.4501771Minimum 2.9642749 5.3501633 4.834001Maximum 7.9946055 9.865391 9.8347861Interquartile range 1.4067942 1.5954365 1.5214803
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 3 / 18
Which drug is superior?
Which group has the maximum mean reduction?
The mean reduction in Systolic BP in the losartan, alasartin and blasartingroups were 4.958713, 7.7409001 and 7.4445712 millimeters of mercuryrespectively.
Which test should we use?
What are the options?
Parametric – ANOVANon-parametric – Kruskal Wallis
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 4 / 18
Which drug is superior?
Which group has the maximum mean reduction?
The mean reduction in Systolic BP in the losartan, alasartin and blasartingroups were 4.958713, 7.7409001 and 7.4445712 millimeters of mercuryrespectively.
Which test should we use?
What are the options?
Parametric – ANOVANon-parametric – Kruskal Wallis
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 4 / 18
Which drug is superior?
Which group has the maximum mean reduction?
The mean reduction in Systolic BP in the losartan, alasartin and blasartingroups were 4.958713, 7.7409001 and 7.4445712 millimeters of mercuryrespectively.
Which test should we use?
What are the options?
Parametric – ANOVANon-parametric – Kruskal Wallis
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 4 / 18
Which drug is superior?
Which group has the maximum mean reduction?
The mean reduction in Systolic BP in the losartan, alasartin and blasartingroups were 4.958713, 7.7409001 and 7.4445712 millimeters of mercuryrespectively.
Which test should we use?
What are the options?
Parametric – ANOVANon-parametric – Kruskal Wallis
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 4 / 18
Which drug is superior?
Which group has the maximum mean reduction?
The mean reduction in Systolic BP in the losartan, alasartin and blasartingroups were 4.958713, 7.7409001 and 7.4445712 millimeters of mercuryrespectively.
Which test should we use?
What are the options?
Parametric – ANOVANon-parametric – Kruskal Wallis
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 4 / 18
Which drug is superior?
Which group has the maximum mean reduction?
The mean reduction in Systolic BP in the losartan, alasartin and blasartingroups were 4.958713, 7.7409001 and 7.4445712 millimeters of mercuryrespectively.
Which test should we use?
What are the options?
Parametric – ANOVANon-parametric – Kruskal Wallis
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 4 / 18
Which test to use
Lets look at the attributes of the data
Independence
Is the reading of each subject independent of others?
Normal or not
ANOVA can be done only if the data is normally distributed.How can we say if it is normally distributed or not? The following toolscan be used
1 Visually – boxplot, histogram, Q-Q plot
2 Tests - Kolmogorov-Smirnov, Shapiro-Wilk test and others
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 5 / 18
Which test to use
Lets look at the attributes of the data
Independence
Is the reading of each subject independent of others?
Normal or not
ANOVA can be done only if the data is normally distributed.How can we say if it is normally distributed or not? The following toolscan be used
1 Visually – boxplot, histogram, Q-Q plot
2 Tests - Kolmogorov-Smirnov, Shapiro-Wilk test and others
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 5 / 18
Which test to use
Lets look at the attributes of the data
Independence
Is the reading of each subject independent of others?
Normal or not
ANOVA can be done only if the data is normally distributed.How can we say if it is normally distributed or not? The following toolscan be used
1 Visually – boxplot, histogram, Q-Q plot
2 Tests - Kolmogorov-Smirnov, Shapiro-Wilk test and others
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 5 / 18
Which test to use
Lets look at the attributes of the data
Independence
Is the reading of each subject independent of others?
Normal or not
ANOVA can be done only if the data is normally distributed.How can we say if it is normally distributed or not? The following toolscan be used
1 Visually – boxplot, histogram, Q-Q plot
2 Tests - Kolmogorov-Smirnov, Shapiro-Wilk test and others
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 5 / 18
Which test to use
Lets look at the attributes of the data
Independence
Is the reading of each subject independent of others?
Normal or not
ANOVA can be done only if the data is normally distributed.How can we say if it is normally distributed or not? The following toolscan be used
1 Visually – boxplot, histogram, Q-Q plot
2 Tests - Kolmogorov-Smirnov, Shapiro-Wilk test and others
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 5 / 18
Which test to use
Lets look at the attributes of the data
Independence
Is the reading of each subject independent of others?
Normal or not
ANOVA can be done only if the data is normally distributed.How can we say if it is normally distributed or not? The following toolscan be used
1 Visually – boxplot, histogram, Q-Q plot
2 Tests - Kolmogorov-Smirnov, Shapiro-Wilk test and others
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 5 / 18
Attributes of the data contd.
Equal variance(Homoscedasticity)
1 Visually – Residuals plot
2 Tests – Levene’s test and Barlett’s test.But ANOVA is resistant/robust against inequality of variances.
Linearity of means
Will be explained later.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 6 / 18
Attributes of the data contd.
Equal variance(Homoscedasticity)
1 Visually – Residuals plot
2 Tests – Levene’s test and Barlett’s test.But ANOVA is resistant/robust against inequality of variances.
Linearity of means
Will be explained later.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 6 / 18
Attributes of the data contd.
Equal variance(Homoscedasticity)
1 Visually – Residuals plot
2 Tests – Levene’s test and Barlett’s test.But ANOVA is resistant/robust against inequality of variances.
Linearity of means
Will be explained later.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 6 / 18
Attributes of the data contd.
Equal variance(Homoscedasticity)
1 Visually – Residuals plot
2 Tests – Levene’s test and Barlett’s test.But ANOVA is resistant/robust against inequality of variances.
Linearity of means
Will be explained later.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 6 / 18
Attributes of the data contd.
Equal variance(Homoscedasticity)
1 Visually – Residuals plot
2 Tests – Levene’s test and Barlett’s test.But ANOVA is resistant/robust against inequality of variances.
Linearity of means
Will be explained later.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 6 / 18
Normality of our data-Histograms
Histogram of Losartan group
Systolic BP reduction
Fre
quen
cy
2 3 4 5 6 7 8
05
10
Figure: Histogram of losartan group
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 7 / 18
Normality of our data-Histograms contd.
Histogram of Alasartan group
Systolic BP reduction
Fre
quen
cy
5 6 7 8 9 10
04
8
Figure: Histogram of Alasartan group
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 8 / 18
Normality of our data-Histograms contd.
Histogram of Blasartan group
Systolic BP reduction
Fre
quen
cy
4 5 6 7 8 9
05
1015
Figure: Histogram of Blasartan group
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 9 / 18
Normality of our data-Boxplot
1 2 3
35
79
Boxplots of all 3 groups
Systolic BP reduction
Figure: Boxplot of all three groups
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 10 / 18
Normality of our data-QQ Plot
−2 −1 0 1 2
35
7
QQ Plot of losartan group
Theoretical Quantiles
Sam
ple
Qua
ntile
s
Figure: QQ Plot of losartan group
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 11 / 18
Normality of our data-QQ Plot contd.
−2 −1 0 1 2
67
89
QQ Plot of Alasartan group
Theoretical Quantiles
Sam
ple
Qua
ntile
s
Figure: QQ Plot of Alasartan group
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 12 / 18
Normality of our data-QQ Plot contd.
−2 −1 0 1 2
57
9
QQ Plot of Blasartan group
Theoretical Quantiles
Sam
ple
Qua
ntile
s
Figure: QQ Plot of Blasartan group
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 13 / 18
Assumptions of ANOVA
To emphasize, the following are the assumptions of ANOVA which have tobe satistfied.
1 Independence
2 Variables in each groups should have a normal distribution.
3 All groups should have similar variance
4 Linearity of means
What about our data?
Did our data meet the requirements of these assumptions?
YES
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 14 / 18
Assumptions of ANOVA
To emphasize, the following are the assumptions of ANOVA which have tobe satistfied.
1 Independence
2 Variables in each groups should have a normal distribution.
3 All groups should have similar variance
4 Linearity of means
What about our data?
Did our data meet the requirements of these assumptions?
YES
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 14 / 18
Assumptions of ANOVA
To emphasize, the following are the assumptions of ANOVA which have tobe satistfied.
1 Independence
2 Variables in each groups should have a normal distribution.
3 All groups should have similar variance
4 Linearity of means
What about our data?
Did our data meet the requirements of these assumptions?
YES
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 14 / 18
ANOVA Test
Lets go ahead and perform ANOVA.
The following table displays the ANOVA table for the comparison ofdifferences in systolic BP across the three groups.
Df Sum Sq Mean Sq F value Pr(>F)
group 2 233.46 116.73 103.50 0.0000Residuals 147 165.79 1.13
Table: ANOVA Table of Differences across the 3 groups
Significance!!
is there a significant difference between the groups?
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 15 / 18
ANOVA Test
Lets go ahead and perform ANOVA.The following table displays the ANOVA table for the comparison ofdifferences in systolic BP across the three groups.
Df Sum Sq Mean Sq F value Pr(>F)
group 2 233.46 116.73 103.50 0.0000Residuals 147 165.79 1.13
Table: ANOVA Table of Differences across the 3 groups
Significance!!
is there a significant difference between the groups?
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 15 / 18
ANOVA Test
Lets go ahead and perform ANOVA.The following table displays the ANOVA table for the comparison ofdifferences in systolic BP across the three groups.
Df Sum Sq Mean Sq F value Pr(>F)
group 2 233.46 116.73 103.50 0.0000Residuals 147 165.79 1.13
Table: ANOVA Table of Differences across the 3 groups
Significance!!
is there a significant difference between the groups?
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 15 / 18
ANOVA Test
Lets go ahead and perform ANOVA.The following table displays the ANOVA table for the comparison ofdifferences in systolic BP across the three groups.
Df Sum Sq Mean Sq F value Pr(>F)
group 2 233.46 116.73 103.50 0.0000Residuals 147 165.79 1.13
Table: ANOVA Table of Differences across the 3 groups
Significance!!
is there a significant difference between the groups?
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 15 / 18
Next step, Which group(s) is/are superior?
We shall perform pairwise ”t-tests” between group to find out whichgroup(s) is superior if there indeed is any.
Indeed we find that the Alasartan and Blasartan groups have a higherSystolic BP reduction when compared with the Losartan group.
This we did by the ”Bonferroni Correction”
Hence we can conclude that both Alasartan and Blasartan aresuperior to losartan in reducing Systolic BP.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 16 / 18
Next step, Which group(s) is/are superior?
We shall perform pairwise ”t-tests” between group to find out whichgroup(s) is superior if there indeed is any.
Indeed we find that the Alasartan and Blasartan groups have a higherSystolic BP reduction when compared with the Losartan group.
This we did by the ”Bonferroni Correction”
Hence we can conclude that both Alasartan and Blasartan aresuperior to losartan in reducing Systolic BP.
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 16 / 18
Recommended reads
1 Probability and Statistics (4th Edition) Hardcover - January 6, 2011by Morris H. DeGroot (Author), Mark J. Schervish (Author)
2 Interpretation and Uses of Medical Statistics Paperback - Import, 4Jul 2000 by Leslie Daly (Author), Geoffrey J Bourke (Author)
3 Does your data violate one-way ANOVA assumptions?
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 17 / 18
This presentation was possible due to!!
P Guruprasad SR, Pharmacology,AIIMS ANOVA and its Applications March 20, 2015 18 / 18