Nemours Biomedical Research Statistics April 16, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.

Slides:



Advertisements
Similar presentations
Randomized Complete Block and Repeated Measures (Each Subject Receives Each Treatment) Designs KNNL – Chapters 21,
Advertisements

Analysis of Variance (ANOVA) ANOVA methods are widely used for comparing 2 or more population means from populations that are approximately normal in distribution.
Chapter 11 Analysis of Variance
Analysis of variance (ANOVA)-the General Linear Model (GLM)
Model Adequacy Checking in the ANOVA Text reference, Section 3-4, pg
Design of Experiments and Analysis of Variance
ANOVA: Analysis of Variation
Analysis of Variance and Multiple Comparisons Comparing more than two means and figuring out which are different.
ANOVA notes NR 245 Austin Troy
Analysis of variance (ANOVA)-the General Linear Model (GLM)
Statistics for Managers Using Microsoft® Excel 5th Edition
1 Multifactor ANOVA. 2 What We Will Learn Two-factor ANOVA K ij =1 Two-factor ANOVA K ij =1 –Interaction –Tukey’s with multiple comparisons –Concept of.
RESEARCH STATISTICS Jobayer Hossain Larry Holmes, Jr, November 20, 2008 Analysis of Variance.
Part I – MULTIVARIATE ANALYSIS
Chapter 11 Analysis of Variance
Analysis of Variance. Experimental Design u Investigator controls one or more independent variables –Called treatment variables or factors –Contain two.
Statistics for Managers Using Microsoft® Excel 5th Edition
Chapter 3 Experiments with a Single Factor: The Analysis of Variance
Experimental Design Terminology  An Experimental Unit is the entity on which measurement or an observation is made. For example, subjects are experimental.
Nemours Biomedical Research Statistics April 2, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Lecture 9: One Way ANOVA Between Subjects
8. ANALYSIS OF VARIANCE 8.1 Elements of a Designed Experiment
13-1 Designing Engineering Experiments Every experiment involves a sequence of activities: Conjecture – the original hypothesis that motivates the.
One-way Between Groups Analysis of Variance
Nemours Biomedical Research Statistics March 26, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Statistical Methods in Computer Science Hypothesis Testing II: Single-Factor Experiments Ido Dagan.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Chap 10-1 Analysis of Variance. Chap 10-2 Overview Analysis of Variance (ANOVA) F-test Tukey- Kramer test One-Way ANOVA Two-Way ANOVA Interaction Effects.
Two-Way Analysis of Variance STAT E-150 Statistical Methods.
Chapter 12 Inferential Statistics Gay, Mills, and Airasian
Chapter 12: Analysis of Variance
F-Test ( ANOVA ) & Two-Way ANOVA
QNT 531 Advanced Problems in Statistics and Research Methods
11. Analysis of Variance (ANOVA). Analysis of Variance Review of T-Test ✔ The basic ANOVA situation How ANOVA works One factor ANOVA model ANCOVA and.
Copyright © 2013, 2010 and 2007 Pearson Education, Inc. Chapter Comparing Three or More Means 13.
STAT 3130 Guest Speaker: Ashok Krishnamurthy, Ph.D. Department of Mathematical and Statistical Sciences 24 January 2011 Correspondence:
Chapter 11 HYPOTHESIS TESTING USING THE ONE-WAY ANALYSIS OF VARIANCE.
 The idea of ANOVA  Comparing several means  The problem of multiple comparisons  The ANOVA F test 1.
Design and Analysis of Experiments Dr. Tai-Yue Wang Department of Industrial and Information Management National Cheng Kung University Tainan, TAIWAN,
t(ea) for Two: Test between the Means of Different Groups When you want to know if there is a ‘difference’ between the two groups in the mean Use “t-test”.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Experimental Design and Analysis of Variance Chapter 10.
Chapter 10 Analysis of Variance.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
Repeated Measures  The term repeated measures refers to data sets with multiple measurements of a response variable on the same experimental unit or subject.
Repeated Measurements Analysis. Repeated Measures Analysis of Variance Situations in which biologists would make repeated measurements on same individual.
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Analysis of Variance Statistics for Managers Using Microsoft.
Chapter 19 Analysis of Variance (ANOVA). ANOVA How to test a null hypothesis that the means of more than two populations are equal. H 0 :  1 =  2 =
Analysis of Variance 1 Dr. Mohammed Alahmed Ph.D. in BioStatistics (011)
ANOVA: Analysis of Variance. The basic ANOVA situation Two variables: 1 Nominal, 1 Quantitative Main Question: Do the (means of) the quantitative variables.
Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics ANalysis Of VAriance: ANOVA.
Single Factor or One-Way ANOVA Comparing the Means of 3 or More Groups Chapter 10.
ANOVA: Analysis of Variance.
Lecture 9-1 Analysis of Variance
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Marshall University School of Medicine Department of Biochemistry and Microbiology BMS 617 Lecture 13: One-way ANOVA Marshall University Genomics Core.
General Linear Model.
Correlated-Samples ANOVA The Univariate Approach.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
Analysis of Variance STAT E-150 Statistical Methods.
Chapters Way Analysis of Variance - Completely Randomized Design.
Nemours Biomedical Research Statistics April 9, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Educational Research Inferential Statistics Chapter th Chapter 12- 8th Gay and Airasian.
ANOVA: Analysis of Variation
ANOVA: Analysis of Variation
ANOVA: Analysis of Variation
ANOVA: Analysis of Variation
Factorial Experiments
ANOVA Econ201 HSTS212.
ANOVA: Analysis of Variance
Presentation transcript:

Nemours Biomedical Research Statistics April 16, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility

Nemours Biomedical Research Experimental Design Terminology An Experimental Unit is the entity on which measurement or an observation is made. For example, subjects are experimental units in most clinical studies. Homogeneous Experimental Units: Units that are as uniform as possible on all characteristics that could affect the response. Randomization is the process of assigning experimental units randomly to different experimental groups. Replication is the repetition of an entire experiment or portion of an experiment under two or more sets of conditions.

Nemours Biomedical Research Experimental Design Terminology A Factor is a controllable independent variable that is being investigated to determine its effect on a response. E.g. treatment group is a factor. Factors can be fixed or random –Fixed -- the factor can take on a discrete number of values and these are the only values of interest. –Random -- the factor can take on a wide range of values and one wants to generalize from specific values to all possible values. Each specific value of a factor is called a level. E.g. treatment group: A, B, and placebo. Then all these are three levels.

Nemours Biomedical Research Experimental Design Terminology Effect is the change in the average response between two factor levels. That is, factor effect = average response at one level – average response at a second level.

Nemours Biomedical Research Experimental Design Terminology Interaction is the joint factor effects in which the effect of one factor depends on the levels of the other factors. No interaction effect of factor A and B Interaction effect of factor A and B

Nemours Biomedical Research Analysis of Variance (ANOVA) The analysis of variance (ANOVA) is a technique of decomposing the total variability of a response variable into: Variability due to the experimental factor(s) and… Variability due to error (i.e., factors that are not accounted for in the experimental design). The basic purpose of ANOVA is to test the equality of several means. A fixed effect model includes only fixed factors in the model. A random effect model includes only random factors in the model. A mixed effect model includes both fixed and random factors in the model.

Nemours Biomedical Research The basic ANOVA situation  Type of variables: Quantitative response and Categorical (factor) predictors (independent variable).  Main Question: Are mean response measures of different groups are equal?  One categorical variable with only 2 levels (groups):  2-sample t-test  One categorical variable with more than two levels (groups):  One way ANOVA  Two or more categorical variable, each with at least two or more levels (groups) of each:  Factorial ANOVA

Nemours Biomedical Research Graphical Investigation  Graphical investigation: side-by-side box plots multiple histograms Side by Side Boxplots

Nemours Biomedical Research One-way analysis of Variance One factor of k levels or groups. E.g., 3 treatment groups in our default data Total variation of observations (SST) can be split in two components: variation between groups (SSG) and variation within groups (SSE). Variation between groups is due to the difference in different groups. E.g. different treatment groups or different doses of the same treatment. Variation within groups is the inherent variation among the observations within each group. Completely randomized design (CRD) is an example of one-way analysis of variance.

Nemours Biomedical Research One-way analysis of Variance Model: –y ij = µ + a i + e ij –Where y ij is the i th observation of the j th group –a i is the effect of the i th group –µ is the grand mean and e ij is the error. Assumptions: –Observations y ij are independent. –e ij are normally distributed with mean zero and constant standard deviation. –The second assumption implies that response variable for each group is normal (Check using q-q plot, histogram, or test for normality) and standard deviations for all groups are equal (rule of thumb: ratio of largest to smallest are approximately 2:1).

Nemours Biomedical Research One-way analysis of Variance Hypothesis: H o : Means of all groups are equal. H a : At least one of them is not equal to other. –doesn’t say how or which ones differ. –Can follow up with “multiple comparisons” ANOVA Table for one way classified data Sources of Variation Sum of Squares dfMean Sum of Squares F-Ratio GroupSSGk-1MSG=SSG/k-1F=MSG/MSE ErrorSSEn-kMSE=SSE/n-k TotalSSTn-1 Note: Large F means that MSG is large compared to MSE

Nemours Biomedical Research Summary One-way ANOVA  Significance of the differences between the groups depends on the difference in the means the standard deviations of each group the sample sizes A useful web (thanks Bette for sending this website for the class):  ANOVA determines P-value from the F statistic

Nemours Biomedical Research 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 HSD method –Bonferroni’s method –Scheffe’s method –Dunn’s multiple-comparison procedure –Dunnett’s Procedure

Nemours Biomedical Research One-way ANOVA – Rcmdr Demo Make sure that group variables are in factor form. Data->Manage variables in active data set -> Convert numeric variables to factor -> pick variables, select supply level names or Use numbers for Factor levels, Give a new name or leave as the same name. To run one-way ANOVA: Statistics -> Means-> One-way ANOVA -> Model Name, pick response variable (e.g, PLUC.post), pick group variable (e.g. grp), select pairwise comparisons of means

Nemours Biomedical Research One-way ANOVA output: Pluc.pre on treatment groups > Model1 <- aov(PLUC.post ~ grp, data=data) > summary(Model1) Df Sum Sq Mean Sq F value Pr(>F) grp e-07 *** Residuals Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > numSummary(data$PLUC.post, groups=data$grp, statistics=c("mean", "sd")) mean sd n

Nemours Biomedical Research One-way ANOVA output: Pluc.pre on treatment groups >.Pairs <- glht(Model1, linfct = mcp(grp = "Tukey")) > confint(.Pairs) Simultaneous Confidence Intervals Multiple Comparisons of Means: Tukey Contrasts Fit: aov(formula = PLUC.post ~ grp, data = data) Estimated Quantile = % family-wise confidence level Linear Hypotheses: Estimate lwr upr == == ==

Nemours Biomedical Research One-way ANOVA output: Pluc.pre on treatment groups

Nemours Biomedical Research 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.

Nemours Biomedical Research Analysis of variance of factorial experiment (Two or more factors) Model with two factors (A, B) and their interactions: Assumptions: The same as in One-way ANOVA.

Nemours Biomedical Research Analysis of variance of factorial experiment (Two or more factors) Null Hypotheses: H oa : Means of all groups of the factor A are equal. H ob : Means of all groups of the factor B are equal. H oab :(αβ) ij = 0, i. e. two factors A and B are independent

Nemours Biomedical Research Two Factor ANOVA ANOVA for two factors A and B with their interaction AB.

Nemours Biomedical Research Two-factor ANOVA - Rcmdr Demo Statistics -> Means-> One-way ANOVA -> Model Name, pick response variable (e.g, PLUC.post), pick group variable (e.g. grp), select pairwise comparisons of means

Nemours Biomedical Research Two- way ANOVA output: Pluc.pre on treatment groups and ped Model2 <- (lm(PLUC.post ~ grp*Ped, data=data)) > Anova(Model2) Anova Table (Type II tests) Response: PLUC.post Sum Sq Df F value Pr(>F) grp e-07 *** Ped grp:Ped Residuals Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > tapply(data$PLUC.post, list(grp=data$grp, Ped=data$Ped), mean, na.rm=TRUE) + # means Ped grp

Nemours Biomedical Research > tapply(data$PLUC.post, list(grp=data$grp, Ped=data$Ped), sd, na.rm=TRUE) + # std. deviations Ped grp > tapply(data$PLUC.post, list(grp=data$grp, Ped=data$Ped), function(x) + sum(!is.na(x))) # counts Ped grp Two- way ANOVA output: Pluc.pre on treatment groups and ped

Nemours Biomedical Research Repeated Measures The term repeated measures refers to data sets with multiple measurements of a response variable on the same experimental unit or subject. In repeated measurements designs, we are often concerned with two types of variability: –Between-subjects - Variability associated with different groups of subjects who are treated differently (equivalent to between groups effects in one- way ANOVA) –Within-subjects - Variability associated with measurements made on an individual subject.

Nemours Biomedical Research Repeated Measures Examples of Repeated Measures designs: A.Two groups of subjects treated with different drugs for whom responses are measured at six-hour increments for 24 hours. Here, DRUG treatment is the between-subjects factor and TIME is the within-subjects factor. B.Students in three different statistics classes (taught by different instructors) are given a test with five problems and scores on each problem are recorded separately. Here CLASS is a between-subjects factor and PROBLEM is a within-subjects factor.

Nemours Biomedical Research Repeated Measures When measures are made over time as in example A we want to assess:  how the dependent measure changes over time independent of treatment (i.e. the main effect of time)  how treatments differ independent of time (i.e., the main effect of treatment)  how treatment effects differ at different times (i.e. the treatment by time interaction). Repeated measures require special treatment because:  Observations made on the same subject are not independent of each other.  Adjacent observations in time are likely to be more correlated than non- adjacent observations

Nemours Biomedical Research Response Time Repeated Measures

Nemours Biomedical Research Repeated Measures Methods of repeated measures ANOVA  Univariate - Uses a single outcome measure.  Multivariate - Uses multiple outcome measures.  Mixed Model Analysis - One or more factors (other than subject) are random effects. We will discuss only univariate approach

Nemours Biomedical Research Repeated Measures Assumptions:  Subjects are independent.  The repeated observations for each subject follows a multivariate normal distribution  The correlation between any pair of within subjects levels are equal. This assumption is known as sphericity.

Nemours Biomedical Research Repeated Measures Test for Sphericity:  Mauchley’s test Violation of sphericity assumption leads to inflated F statistics and hence inflated type I error. Three common corrections for violation of sphericity:  Greenhouse-Geisser correction  Huynh-Feldt correction  Lower Bound correction All these three methods adjust the degrees of freedom using a correction factor called Epsilon. Epsilon lies between 1/k-1 to 1, where k is the number of levels in the within subject factor.

Nemours Biomedical Research Repeated Measures - R Demo The following R commands will arrange the data in default.csv for the ANOVA of repeated measures (you can also use R functions gl() for this manipulation), - attach(x) sid1<- c(sid,sid) grp1<-c(grp,grp) plc<- c(PLUC.pre, Pluc.post) time<-c(rep(1,60),rep(2,60)) The following code is for repeated measures ANOVA summary(aov(plc~factor(grp1)*factor(time) + Error(factor(sid1))))

Nemours Biomedical Research Repeated Measures R output: Error: factor(sid1) Df Sum Sq Mean Sq F value Pr(>F) factor(grp1) e-06 *** Residuals Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Error: Within Df Sum Sq Mean Sq F value Pr(>F) factor(time) e-07 *** factor(grp1):factor(time) * Residuals Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Nemours Biomedical Research Thank you