3 Group Analysis: Why and how? Make general conclusions about some population, e.g.,Do men and women differ on responding to fear?What regions are related to happiness, sad, love, faith, empathy, etc.?Partition/untangle data variability into various effects, e.g.,What differs when a person listens to classical music vs. rock ‘n’ roll?Why two tiers of analysis: individual and then group?No perfect approach to combining both into a batch analysisEach subject may have slightly different design or missing dataHigh computation costUsually we take β’s (% signal change) to group analysisWithin-subject variation relatively small compared to cross-subject
4 Group Analysis: Basic concepts VariablesDependent: percent signal changes (β’s)Independent: factors (condition/task, sex, subject) and covariates (IQ, age)Factor: a categorization (variable) of conditions/tasks/subjects2 types: fixed and randomFixed factorTreated as a fixed variable in the modelCategorization of experiment conditions (mode: Face/House)Group of subjects (male/female, normal/patient)All levels of the factor are of interest and included for replications among subjectsFixed in the sense of inferenceapply only to the specific levels of the factor, e.g., the response to face/house is well-defineddon’t extend to other potential levels that might have been included, e.g., the response to face/house doesn’t say anything about the response to music
5 Group Analysis: Basic concepts Random factorExclusively refers to subject in FMRITreated as a random variable in the modelaverage + random effects uniquely attributable to each subject: N(0, σ2)Each subject is of NO interestRandom in the sense of inferencesubjects serve as a random sample of a populationthis is why we recruit a lot of subjects for a studyinferences can be generalized to a populationwe usually have to set a long list of criteria when recruiting subjects (right-handed, healthy, age 20-40, native English speaker, etc.)CovariatesConfounding/nuisance effectsContinuous variables of no interestMay cause spurious effects or decrease power if not modeledSome measures about subject: age, IQ, cross-conditions/tasks behavior data, etc.
6 Group Analysis: Types Fixed: factor, analysis/model/effects Fixed-effects analysis (sometimes): averaging among a few subjectsNon-parametric testsMixed designMixed design: crossed [e.g., AXBXC] and nested [e.g., BXC(A)]Psychologists: Within-subject (repeated measures) / between-subjects factorMixed-effects analysis (aka random-effects)ANOVA: contains both types of factors: both inter/intra-subject variancesCrossed, e.g., AXBXCNested, e.g., BXC(A)ANCOVALMEUnifying and extending ANOVA and ANCOVAUsing ML or ReML
7 Group Analysis: What do we get out of the analysis Using an intuitive example of income (dependent variable)Factor A: sex (men vs. women)factor B: race (whites vs. blacks)Main effectF: general information about all levels of a factorAny difference between two sexes or racesmen > women; whites > blacksIs it fair to only focus on main effects?InteractionF: Mutual/reciprocal influence among 2 or more factorsEffect of a factor depends on levels of other factors, e.g.,Black men < black womenBlack women almost the same as white womenBlack men << white menGeneral linear testContrastGeneral linear test (e.g., trend analysis)
8 Group Analysis: TypesAveraging across subjects (fixed-effects analysis)Number of subjects n < 6Case study: can’t generalize to whole populationSimple approach (3dcalc)T = ∑tii/√nSophisticated approachB = ∑(bi/√vi)/∑(1/√vi), T = B∑(1/√vi)/√n, vi = variance for i-th regressorB = ∑(bi/vi)/∑(1/vi), T = B√[∑(1/vi)]Combine individual data and then run regressionMixed-effects analysisNumber of subjects n > 10Random effects of subjectsIndividual and group analyses: separateWithin-subject variation ignoredMain focus of this talk
9 Group Analysis: Programs in AFNI Non-parametric analysis4 < number of subjects < 10No assumption of normality; statistics based on rankingPrograms3dWilcoxon (~ paired t-test)3dMannWhitney (~ two-sample t-test)3dKruskalWallis (~ between-subjects with 3dANOVA)3dFriedman (~one-way within-subject with 3dANOVA2)Permutation testMultiple testing correction with FDR (3dFDR)Less sensitive to outliers (more robust)Less flexible than parametric testsCan’t handle complicated designs with more than one fixed factor
10 Group Analysis: Programs in AFNI Parametric tests (mixed-effects analysis)Number of subjects > 10Assumption: Gaussian random effectsPrograms3dttest (one-sample, two-sample and paired t)3dANOVA (one-way between-subject)3dANOVA2 (one-way within-subject, 2-way between-subjects)3dANOVA3 (2-way within-subject and mixed, 3-way between-subjects)3dRegAna (regression/correlation, simple unbalanced ANOVA, simple ANCOVA)GroupAna (Matlab package for up to 5-way ANOVA)3dLME (R package for all sorts of group analysis)
11 Group Analysis: Planning for mixed-effects analysis How many subjects?Power/efficiency: proportional to √n; n > 10Balance: Equal number of subjects across groups if possibleInput filesCommon brain in tlrc space (resolution doesn’t have to be 1x1x1 mm3 )Percent signal change (not statistics) or normalized variablesHRF magnitude: Regression coefficientsLinear combinations of β‘sAnalysis designNumber of factorsNumber of levels for each factorFactor typesFixed (factors of interest) vs. random (subject)Cross/nesting: Balanced? Within-subject/repeated-measures vs. between-subjectsWhich program?3dttest, 3dANOVA/2/3, GroupAna, 3dRegAna, 3dLME
12 Group Analysis: Planning ThresholdingTwo-tail by default in AFNIIf one-tail p is desirable, look for 2p on AFNIScripting – 3dANOVA3Three-way between-subjects (type 1)3 categorizations of groups: sex, disease, ageTwo-way within-subject (type 4): Crossed design A×B×COne group of subjects: 16 subjectsTwo categorizations of conditions: A – category; B - affectTwo-way mixed (type 5): B×C(A)Nesting (between-subjects) factor (A): subject classification, e.g., sexOne category of condition (within-subject factor B): condition (visual vs. auditory)Nesting: balanced
13 Group Analysis: Example – 2-way within-subject ANOVA 3dANOVA3 -type 4 -alevels 3 -blevels 3 -clevels 16 \-dset stats.sb04.beta+tlrc’’ \-dset stats.sb04.beta+tlrc’’ \-dset stats.sb04.beta+tlrc’’ \-dset stats.sb04.beta+tlrc’’ \…-fa Category \-fb Affect \-fab CatXAff \-amean T \ (coding with indices)-acontr TvsF \(coding with coefficients)-bcontr non-neu \ (coefficients)-aBcontr : 1 TvsE-pos \ (coefficients)-Abcontr 2 : EPosvsENeg \ (coefficients)-bucket anova33Model type,Factor levelsInput for each cell inANOVA table:totally 3X3X16 = 144F tests: Main effects &interactiont tests: 1st order Contrastst tests: 2nd order ContrastsOutput: bundled
14 Group Analysis: GroupAna Multi-way ANOVAMatlab script package for up to 5-way ANOVACan handle both volume and surface dataCan handle up to 4-way unbalanced designsUnbalanced: unequal number of subjects across groupsNo missing data from subjects allowedDownsidesRequires Matlab plus Statistics ToolboxSlow (minutes to hours): GLM approach - regression through dummy variablesComplicated design, and compromised powerSolution to heavy duty computationInput with lower resolution recommendedResample with adwarp -dxyz # or 3dresampleSee for more infoAlternative: 3dLME
15 Group Analysis: ANCOVA (ANalysis of COVAriances) Why ANCOVA?Subjects or cross-regressors effects might not be an ideally randomizedIf not controlled, such variability will lead to loss of power and accuracyDifferent from amplitude modulation: cross-regressors vs. within-regressor variationDirect control via design: balanced selection of subjects (e.g., age group)Indirect (statistical) control: add covariates in the modelCovariate (variable of no interest): uncontrollable/confounding, usually continuousAge, IQ, cortex thicknessBehavioral data, e.g., response time, correct/incorrect rate, symptomatology score, …ANCOVA = Regression + ANOVAAssumption: linear relation between HDR and the covariateGLM approach: accommodate both categorical and quantitative variablesPrograms3dRegAna: for simple ANCOVAIf the analysis can be handled with 3dttest without covariatesSee for more information3dLME: R package
16 Group Analysis: 3dLME An R package Open source platform Linear mixed-effects (LME) modelingVersatile: handles almost all situations in one packageUnbalanced designs (unequal number of subjects, missing data, etc.)ANOVA and ANCOVA, but unlimited number of factors and covariatesAble to handle HRF modeling with basis functionsViolation of sphericity: heteroscedasticity, variance-covariance structureModel fine-tuningNo scripting (input is bundled into a text file model.txt)DisadvantagesHigh computation cost (lots of repetitive calculation)Sometimes difficult to compare with traditional ANOVASee for more information
17 Group Analysis: 3dLME HRF modeled with basis functions Traditional approach: AUCCan’t detect shape differenceDifficult to handle betas with mixed signsLME approachUsually H0: β1=β2=…=βkBut now we don’t care about the differences among β’sInstead we want to detect shape differenceH0: β1=β2=…=βk=0Solution: take all β’s and model with no interceptBut we have to deal with temporal correlations among β’s!
18 Group Analysis: 3dLME Running LME Create a text file model.txt (3 fixed factors plus 1 covariate)Data:Volume <-- either Volume or SurfaceOutput:FileName <-- any string (no suffix needed)MASK:Mask+tlrc.BRIK <-- mask datasetModel:Gender*Object*Modality+Age <-- model formula for fixed effectsCOV:Age <-- covariate listRanEf:TRUE <-- random effectsVarStr:0CorStr:0SS:sequentialMFace-FFace <-- contrast labelMale*Face*0*0-Female*Face*0* <-- contrast specificationMVisual-MaudialMale*0*Visual*0-Male*0*Audial*0......Subj Gender Object Modality Age InputFileJim Male Face Visual file1+tlrc.BRIKCarol Female House Audial file2+tlrc.BRIKKarl Male House Visual file3+tlrc.BRIKCasey Female Face Audial file4+tlrc.BRIKRun 3dLME.R MyOut &
19 Group Analysis: 3dLME Running LME: A more complicated example HRF modeled with 6 tentsNull hypothesis: no HRF difference between two conditionsData:Volume <-- either Volume or SurfaceOutput:test <-- any string (no suffix needed)MASK:Mask+tlrc.BRIK <-- mask datasetModel:Time <-- model formula for fixed effectsCOV: <-- covariate listRanEff:TRUE <-- random effect specificationVarStr: <-- heteroscedasticity?CorStr:1~Order|Subj <-- correlation structureSS: sequential <-- sequential or marginalSubj Time TimeOrder InputFileJim t contrastT1+tlrc.BRIKJim t contrastT2+tlrc.BRIKJim t contrast3+tlrc.BRIKJim t contrast4+tlrc.BRIK......Output: an F for H0, β and t for each basis function
21 Connectivity: Correlation Analysis Correlation analysis (aka functional connectivity)Similarity between a seed region and the rest of the brainSays not much about causality/directionalityVoxel-wise analysisBoth individual subject and group levelsTwo types: simple and context-dependent correlation (a.k.a. PPI)Steps at individual subject levelCreate ROI (a sphere around peak t-statistic or an anatomical structure)Isolate signal for a condition/taskExtract seed time seriesRun correlation analysis through regression analysisMore accurately, partial (multiple) correlationSteps at group levelConvert correlation coefficients to Z (Fisher transformation): 3dcalcOne-sample t test on Z scores: 3dttestMore details:
22 Connectivity: Path Analysis or SEM Causal modeling (a.k.a. structural or effective connectivity)Start with a network of ROI’sPath analysisAssess the network based on correlations (covariances) of ROI’sMinimize discrepancies between correlations based on data and estimated from modelInput: Model specification, correlation matrix,residual error variances, DFOutput: Path coefficients, various fit indicesCaveatsH0: It is a good model; Accepting H0 is usually desirableValid only with the data and model specifiedNo proof: modeled through correlation analysisEven with the same data, an alternative model might be equally good or betterIf one critical ROI is left out, things may go awryInterpretation of path coefficient: NOT correlation coefficient, possible >1
23 Connectivity: Path Analysis or SEM Path analysis with 1dSEMModel validation: ‘confirm’ a theoretical modelAccept, reject, or modify the model?Model search: look for ‘best’ modelStart with a minimum model (1): can be emptySome paths can be excluded (0), and some optional (2)Model grows by adding one extra path a time‘Best’ in terms of various fit criteriaMore informationDifference between causal and correlation analysisPredefined network (model-based) vs. network search (data-based)Modeling: causation (and directionality) vs. correlationROI vs. voxel-wiseInput: correlation (condensed) vs. original time seriesGroup analysis vs. individual + group
24 Connectivity: Causality Analysis or VAR Causal modeling (a.k.a. structural or effective connectivity)Start with a network of ROI’sCausality analysis through vector auto-regressive modeling (VAR)Assess the network based on correlations of ROIs’ time seriesIf values of region X provide statistically significant information about future values of Y, X is said to Granger-cause YInput: time series from ROIs, covariates (trend, head motion, physiological noise, …)Output: Path coefficients, various fit indicesCausality analysis with 1dVARWritten in RRun in interactive mode for each subjectGenerate a network and path matrixA list of model diagnostic testsRun group analysis on path coefficients
25 Connectivity: Causality Analysis or VAR Causal modeling (a.k.a. structural or effective connectivity)CaveatsIt has assumptions (stationary property, Gaussian residuals, and linearity)Require accurate region selection: missing regions may invalidate the analysisSensitive to number of lagsTime resolutionNo proof: modeled through statistical analysisNot really cause-effect in strict senseInterpretation of path coefficient: temporal correlationSEM versus VARPredefined network (model-based) among ROIsModeling: statistical causation (and directionality)Input: correlation (condensed) vs. original time seriesGroup analysis vs. individual + group
26 Connectivity: Causality Analysis or VAR Why temporal resolution is important?