Group Analysis with Four-Way ANOVA in AFNI Gang Chen, Ziad S. Saad, Robert W. Cox Scientific and Statistical Computing Core, National Institute of Mental.

Slides:



Advertisements
Similar presentations
Multiple-choice question
Advertisements

1-Way Analysis of Variance
GENERAL LINEAR MODELS: Estimation algorithms
Multiple Comparisons in Factorial Experiments
-1- Group Analysis Individual Subject Analysis Pre-Processing Post-Processing FMRI Analysis Experiment Design Scanning.
1 Chapter 4 Experiments with Blocking Factors The Randomized Complete Block Design Nuisance factor: a design factor that probably has an effect.
Analysis of variance (ANOVA)-the General Linear Model (GLM)
Linear regression models
1 1 Slide © 2009, Econ-2030 Applied Statistics-Dr Tadesse Chapter 10: Comparisons Involving Means n Introduction to Analysis of Variance n Analysis of.
Statistics for Managers Using Microsoft® Excel 5th Edition
Analysis of Variance. Experimental Design u Investigator controls one or more independent variables –Called treatment variables or factors –Contain two.
Chapter 4 Multiple Regression.
Chapter 3 Analysis of Variance
Review of Matrix Algebra
Chapter 11 Multiple Regression.
Ordinary least squares regression (OLS)
1 1 Slide © 2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide © 2003 South-Western/Thomson Learning™ Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
Analysis of Variance & Multivariate Analysis of Variance
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.
Chapter 13: Inference in Regression
Factorial Experiments
1 1 Slide © 2006 Thomson/South-Western Slides Prepared by JOHN S. LOUCKS St. Edward’s University Slides Prepared by JOHN S. LOUCKS St. Edward’s University.
1 1 Slide © 2005 Thomson/South-Western Chapter 13, Part A Analysis of Variance and Experimental Design n Introduction to Analysis of Variance n Analysis.
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
1 1 Slide Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple Coefficient of Determination n Model Assumptions n Testing.
Applications The General Linear Model. Transformations.
The Use of Dummy Variables. In the examples so far the independent variables are continuous numerical variables. Suppose that some of the independent.
Psychology 301 Chapters & Differences Between Two Means Introduction to Analysis of Variance Multiple Comparisons.
1 Chapter 13 Analysis of Variance. 2 Chapter Outline  An introduction to experimental design and analysis of variance  Analysis of Variance and the.
Testing Hypotheses about Differences among Several Means.
Repeated Measurements Analysis. Repeated Measures Analysis of Variance Situations in which biologists would make repeated measurements on same individual.
INTRODUCTION TO ANALYSIS OF VARIANCE (ANOVA). COURSE CONTENT WHAT IS ANOVA DIFFERENT TYPES OF ANOVA ANOVA THEORY WORKED EXAMPLE IN EXCEL –GENERATING THE.
1 G Lect 11a G Lecture 11a Example: Comparing variances ANOVA table ANOVA linear model ANOVA assumptions Data transformations Effect sizes.
Adjusted from slides attributed to Andrew Ainsworth
Analysis of Covariance Combines linear regression and ANOVA Can be used to compare g treatments, after controlling for quantitative factor believed to.
Chapter 10: Analysis of Variance: Comparing More Than Two Means.
1 1 Slide © 2012 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole.
Specific Comparisons This is the same basic formula The only difference is that you are now performing comps on different IVs so it is important to keep.
Single-Factor Studies KNNL – Chapter 16. Single-Factor Models Independent Variable can be qualitative or quantitative If Quantitative, we typically assume.
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 14 Comparing Groups: Analysis of Variance Methods Section 14.3 Two-Way ANOVA.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Stats 845 Applied Statistics. This Course will cover: 1.Regression –Non Linear Regression –Multiple Regression 2.Analysis of Variance and Experimental.
Introduction to Basic Statistical Tools for Research OCED 5443 Interpreting Research in OCED Dr. Ausburn OCED 5443 Interpreting Research in OCED Dr. Ausburn.
Two-Way (Independent) ANOVA. PSYC 6130A, PROF. J. ELDER 2 Two-Way ANOVA “Two-Way” means groups are defined by 2 independent variables. These IVs are typically.
Econ 3790: Business and Economic Statistics Instructor: Yogesh Uppal
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
One-Way Analysis of Variance Recapitulation Recapitulation 1. Comparing differences among three or more subsamples requires a different statistical test.
Smith/Davis (c) 2005 Prentice Hall Chapter Fifteen Inferential Tests of Significance III: Analyzing and Interpreting Experiments with Multiple Independent.
1 Statistical Analysis Professor Lynne Stokes Department of Statistical Science Lecture 9 Review.
Significance Tests for Regression Analysis. A. Testing the Significance of Regression Models The first important significance test is for the regression.
ANOVA and Multiple Comparison Tests
Factorial BG ANOVA Psy 420 Ainsworth. Topics in Factorial Designs Factorial? Crossing and Nesting Assumptions Analysis Traditional and Regression Approaches.
1 G Lect 10M Contrasting coefficients: a review ANOVA and Regression software Interactions of categorical predictors Type I, II, and III sums of.
 List the characteristics of the F distribution.  Conduct a test of hypothesis to determine whether the variances of two populations are equal.  Discuss.
The 2 nd to last topic this year!!.  ANOVA Testing is similar to a “two sample t- test except” that it compares more than two samples to one another.
BINARY LOGISTIC REGRESSION
Statistics for Managers Using Microsoft Excel 3rd Edition
Factorial Experiments
Chapter 10: Analysis of Variance: Comparing More Than Two Means
Chapter 5 Introduction to Factorial Designs
Econ 3790: Business and Economic Statistics
CHAPTER 29: Multiple Regression*
Chapter 11 Analysis of Variance
Statistics for the Social Sciences
Comparing Means.
The Analysis of Variance
Chapter 15 Analysis of Variance
Chapter 10 – Part II Analysis of Variance
Presentation transcript:

Group Analysis with Four-Way ANOVA in AFNI Gang Chen, Ziad S. Saad, Robert W. Cox Scientific and Statistical Computing Core, National Institute of Mental Health National Institutes of Health, Department of Health and Human Services, USA Introduction Experimental designs with FMRI are increasingly requiring more factors in group analysis, thus impelling the creation of a four-way ANOVA program in AFNI. With potential expansion to a program capable of running ANCOVA and unbalanced designs, the four-way ANOVA for AFNI datasets is currently implemented in Matlab by converting factors into dummy variables. QR decomposition is used to solve the normal equations of the general linear system. Five design types (fixed/random and crossed/nested) are embedded in the program, allowing for the user to analyze most typical experiments. We present a streamlined way of running ANOVA in which information requested for the four-way analysis is straightforward and saved for the user’s records. Runtime for a typical four-way ANOVA is usually about half an hour. Theory and Numerical Considerations Four-Way ANOVA Table (B F  C F  D R (A F )) 1.Neter, J., Kutner, M. H., Nachtsheim, C. J., and Wasserman, W. (1996), Allied Linear Statistical Models, Fourth Edition, McGraw-Hill. 2.Keppel, G., and Wickens, T. (2004), Design and Analysis. A Research Handbook (4 th Ed.), Prentice Hall. Group analysis is a critical stage in FMRI analysis when the investigator makes some generalization about the conditions/stimuli or their comparisons from single subject to population level. Such a step usually involves the analysis of variance (ANOVA) with various categorizations of stimulus by treating subjects as a random factor. Previously one-, two-, and three-way ANOVAs were implemented in AFNI in C as three separate programs by calculating various sums of squares and t/F statistics. Until recently, these programs met the needs of the users. However, contrast tests among second- order and above terms were not available in three- way ANOVA due to its complications in computation. More importantly, as investigations get more complicated and refined, higher numbers of stimulus categorization are involved in the analysis at group level, and thus a four-way ANOVA in AFNI became highly desirable. Other than the numbers of stimulus categorization, concomitant variables (covariates) and unbalanced design or missing data are very typically encountered in FMRI group analysis. With these considerations in mind, a general linear model approach was adopted by coding factor levels into values of dummy variables. Numerical computation is not done through indexing terms as in previous ANOVA programs; instead the QR decomposition of the design matrix is used to project each term onto its corresponding subspace, and to obtain various sums of squares for all possible terms. Source of Variation F StatisticDistribution AMSA/MSD(A)F(a-1, a(d-1)) BMSB/MSBD(A)F(b-1, a(b-1)(d-1)) CMSC/MSCD(A)F(c-1, a(c-1)(d-1)) D(A)MSD(A)/MSEF(a(d-1), abcd(n-1)) ABMSAB/MSBD(A)F((a-1)(b-1), a(b-1)(d-1)) ACMSAC/MSCD(A)F((a-1)(c-1), a(c-1)(d-1)) BCMSBC/MSBCD(A)F((b-1)(c-1), a(b-1)(c-1)(d-1)) BD(A)MSBD(A)/MSEF(a(b-1)(d-1), abcd(n-1)) CD(A)MSCD(A)/MSEF(a(c-1)(d-1), abcd(n-1)) ABCMSABC/MSBCD(A)F((a-1)(b-1)(c-1), a(b-1)(c-1)(d-1)) BCD(A)MSBCD(A)/MSEF(a(b-1)(c-1)(d-1), abcd(n-1) We start with a prototype of four-way ANOVA with a basic design of AXBXCXD with all factors fixed. The corresponding cell means model leads to a general linear model y = X  +  where y is an n  1 vector of the observation values, X is the cell means design n  m matrix,  is the m  1 regression coefficient vector, and  the random error n  1 vector. This leads to solving the normal equations for ordinary least squares estimation X'X  = X'y Due to the coding with dummy variables, design matrix X is rank deficit as rank(X)<m. In the meantime, a constraints matrix C is defined based on all the factors and their various interactions. The numerical calculations are done through the following basic steps: (1) QR decomposition of constraints matrix C CE c = Q c R c E c is a permutation matrix so that  diag(R c )  is decreasing. (2) Projection of the design matrix X into the null space Q c0 of the constraints matrix C, which is composed of those rows of Q c corresponding to the diagonal zeros in R c X p = XQ c0 (3) QR decomposition of X p X p E d = Q d R d Again E d is a permutation matrix so that  diag(R d )  is decreasing. (4) The degrees of freedom (df) and sum of squares (SS) df = rank(Q d ) SS = ║ŷ║ 2 = ║Q d ' y║ 2 The above steps apply to computing random error and all ANOVA terms (main effects and interactions) as well. Other design types are also based on this basic algorithm. As a demonstration, we assume a four- way ANOVA with a design of B  C  D(A), and among the four factors, A, B, and C are fixed while D is random and nested within A. Following the rules of thumb for writing the ANOVA table (1, 2), we have an ANOVA table with all available variation sources and their corresponding F statistics. Various contrasts with their t statistics are constructed in the same fashion with relevant variance estimates. Sample Dialog: Questions and Answers How many factors? 4 Choose design type (0, 1, 2, 3, 4, 5,...): 2 How many slices along the Z axis? 40 Label for No. 1 factor: MD How many levels does factor A (MD) have? 2 Label for No. 1 level of factor A (MD) is: VI1 Label for No. 2 level of factor A (MD) is: AU …… Label for No. 4 factor: SJ How many levels does factor D (SJ) have? 12 Label for No. 1 level of factor D (SJ) is: S1 …… There should be totally 96 input files. Correct? (1 - Yes; 0 - No) 1 (1) factor combination: factor A (MD) at level 2 (VI1) factor B (FB) at level 2 (NW) factor C (CG) at level 1 (AN) factor D (SJ) at level 12 (S1) is: ss15.a_sound.irf.mean+tlrc.BRIK …… How many 2nd-roder contrasts? (0 if none) 7 Label for 2nd order contrast No. 1: is: vis_avt How many terms are involved? 2 Factor index for No. 1 term is (e.g., 0120): 1010 Corresponding coefficient (i.e., 1 or -1): 1 Factor index for No. 2 term is (e.g., 0120): 1020 Corresponding coefficient (i.e., 1 or -1): -1 …… Running ANOVA on slice: #1... done in seconds …… References Five Design Types of Four-Way ANOVA A F  B F  C F  D F All factors fixed; Fully crossed A,B,C,D=stimulus category, drug treatment, etc. All combinations of subjects and factors exist; Multiple subjects: treated as repeated measures; One subject: longitudinal analysis A F  B F  C F  D R Last factor random; fully crossed A,B,C=stimulus category, etc. D=subjects, typically treated as random (more powerful than treating them as repeats) Good for an experiment where each fixed factor applies to all subjects; B F  C F  D R (A F ) Last factor random, and nested within the first (fixed) factor A=subject class: genotype, sex, or disease B,C=stimulus category, etc. D=subjects nested within A levels B F  C R  D F (A F ) Third factor random; fourth factor fixed and nested within the first (fixed) factor A=stimulus type (e.g., repetition number) B=another stimulus category (e.g., animal/tool) C=subjects D=stimulus subtype (e.g. perceptual/conceptual) C F  D R (A F  B F ) Doubly nested! A, B=subject classes: genotype, sex, or disease C=stimulus category, etc. D=subjects, random with two distinct factors dividing the subjects into finer sub-groups Software Implementation Four-way ANOVA with an unbalanced design (unequal sample size) and with covariates (ANCOVA) are currently under development. The package for four-way ANOVA can be downloaded from the AFNI website: