Why N’ How (I forgot the title) Donald G. McLaren, Ph.D. Department of Neurology, MGH/HMS GRECC, ERNM Veteran’s Hospital http://www.martinos.org/~mclaren 11/15/2012 Types of Data Types of Data – Dependent Variable • Task Data – Single Condition – Multiple Conditions – Multiple Predictors Per Condition • • • • • • Functional Connectivity – Correlation Functional Connectivity -- ICA Context-Dependent Connectivity VBM DTI Other?? Factors, Levels, Groups, Classes Continuous Variables/Factors: Age, IQ, Volume, Behavioral measures (emotional scale, memory ability), Images, etc. Discrete Variables/Factors: Gender, Handedness, Diagnosis Levels of Discrete : Handedness: Left and Right Gender: Male and Female Diagnosis: Normal, MCI, AD Group or Class: Specification of All Discrete Factors: • Left-handed Male MCI • Right-handed Female Normal Overview • From a line to the GLM and matrices • Statistical Tests • Contrasts • Designs • Power • Caveats General Linear Model (GLM) Y=aX+b GLM Theory Is Activity correlated with Age? Activity Dependent Variable, Measurement HRF Amplitude IQ, Height, Weight Subject 1 y1 Subject 2 y2 Age x1 x2 Independent Variable Of course, you’d need more then two subjects … Activity Linear Model Intercept: b System of Linear Equations Slope: m y1 Matrix Formulation y2 Age x1 Intercept = Offset y1 = 1*b + x1*m y2 = 1*b + x2*m x2 X = Design Matrix b = Regression Coefficients = Parameter estimates = “betas” = Intercepts and Slopes b y1 1 x1 = * m y2 1 x2 Y = X*b b= b m Hypotheses and Contrasts Is Activity correlated with Age? Does m = 0? Null Hypothesis: H0: m=0 b y1 1 x1 = * m y2 1 x2 m= [0 1]*b Activity m Intercept: b Slope: m y1 b= b m g = C*b = 0 ? C=[0 1]: Contrast Matrix y2 Age x1 x2 Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 b y1 1 x1 = * m y2 1 x2 b= [1 0]* b Activity m Intercept: b Slope: m y1 b= b m g = C*b = 0 ? C=[1 0]: Contrast Matrix y2 Age x1 x2 Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 b y1 1 x1 = * m y2 1 x2 b= [1 0]* b Slope: m Activity m b= y1 Intercept: b b m g = C*b = 0 ? C=[1 0]: Contrast Matrix y2 Age x1 x2 Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 b y1 1 x1 = * m y2 1 x1 b= [1 0]* b Activity m b= y1 Intercept: b b m g = C*b = 0 ? C=[1 0]: Contrast Matrix y2 Age x1 x2 Hypotheses and Contrasts Is Activity different from 0? Does b = 0? Null Hypothesis: H0: b=0 y1 1 = y2 1 * b b= [1 ]* b Activity b= y1 Intercept: b b g = C*b = 0 ? C=[1 0]: Contrast Matrix y2 Age x1 x2 More than Two Data Points Activity Intercept: b Slope: m Age y1 = 1*b + x1*m y2 = 1*b + x2*m y3 = 1*b + x3*m y4 = 1*b + x4*m b y1 1 x1 = * m y2 1 x2 y3 1 x3 y4 1 x4 Y = X*b+n • Model Error • Noise • Uncertainty The General Linear Model Y = b0 b1 X1 b2 X 2 b p X p Y1 = b 0 b1 x1,1 b 2 x1, 2 b p x1, p 1 Y2 = b 0 b1 x2,1 b 2 x2, 2 b p x2, p 2 Y3 = b 0 b1 x3,1 b 2 x3, 2 b p x3, p 3 Yn = b 0 b1 xn ,1 b 2 xn , 2 b p xn , p n observed Yˆ Y= = predicted In Matrix Form + Y = Xb + e random error Summary of the GLM Y = X . Observed data: Design matrix: Imaging uses a mass univariate approach – that is each voxel is treated as a separate column vector of data. Y is Dependent Brain Value at various subjects/time points at a single voxel Several components which explain the observed data, i.e. the BOLD time series for the voxel Timing info: onset vectors, Omj, and duration vectors, Dmj HRF, hm, describes shape of the expected BOLD response over time Other regressors, e.g. realignment parameters At the group level: these are covariates or grouping columns (see later slide) β + ε Parameters: Error: Define the contribution of each component of the design matrix to the value of Y Estimated so as to minimise the error, ε, i.e. least sums of squares Difference between the observed data, Y, and that predicted by the model, Xβ . Not assumed to be spherical in fMRI Brain Imaging • From the beginning (almost)…. [5 6 7 5] Spatial Normalization, Atlas Space Native Space MNI305 Space Subject 1 Subject 1 MNI305 Subject 2 25 Subject 2 Group Analysis Does not have to be all positive! 26 Contrast Amplitudes Contrast Amplitudes Variances (Error Bars) Mass Univariate Analyses (1) Run the GLM for each voxel. (2) Compute the statistic from the GLM for each voxel (3) Inferences Statistical Parametric Map (SPM) +3% 0% -3% Contrast Amplitude Contrast Amplitude CON, COPE, CES Variance (Error Bars) “Massive Univariate Analysis” 28 -- Analyze each voxel separately VARCOPE, CESVAR Significance t-Map (p,z,F) (Thresholded p<.01) sig=-log10(p) SPM/FSL/AFNI/CUSTOM • It is important to recognize that all programs that utilize the GLM will produce the same result. However, if your design matrices or variance correction methods are different, then you will see differences. • Some slides show illustrations from FSL, others show illustrations from SPM, MATLAB, or other software. These can be done in all programs. Types Of Analysis “Random Effects (RFx)” Analysis t= bG b2 G G bG b2 = G NG 1 DOF = N G 1 RFx 32 2 b b G i “Random Effects (RFx)” Analysis • Model Subjects as a Random Effect • Variance comes from a single source: variance across subjects G bG – Mean at the population mean – Variance of the population variance • Does not take first-level noise into account (assumes 0) • “Ordinary” Least Squares (OLS) • Usually less activation than individuals 33 RFx “Mixed Effects (MFx)” Analysis MFx RFx • Down-weight each subject based on variance. • Weighted Least Squares vs (“Ordinary” LS) 34 “Mixed Effects (MFx)” Analysis • Down-weight each subject based on variance. • Weighted Least Squares vs (“Ordinary” LS) • Protects against unequal variances across group or groups (“heteroskedasticity”) • May increase or decrease significance with respect to simple Random Effects • More complicated to compute • “Pseudo-MFx” – simply weight by first-level MFx variance (easier to compute) 35 “Fixed Effects (FFx)” Analysis t= bG FFx b2 G b2 = G 2 i 2 i N G 2 DOF = DOFi RFx 36 “Fixed Effects (FFx)” Analysis • As if all subjects treated as a single subject (fixed effect) • Small error bars (with respect to RFx) b t= G • Large DOF b2 • Same mean as RFx 2 b2 = i2 • Huge areas of activation N G • Not generalizable beyond sample. G G DOF = DOFi FFx 37 Population vs Sample Group Population (All members) Hundreds? Thousands? Billions? Sample 18 Subjects 38 • Do you want to draw inferences beyond your sample? • Does sample represent entire population? • Random Draw? fMRI Analysis Overview Subject 1 Raw Data Subject 2 Raw Data Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis X Preprocessing MC, STC, B0 Smoothing Normalization C First Level GLM Analysis X C Higher Level GLM Subject 3 Raw Data Preprocessing MC, STC, B0 Smoothing Normalization First Level GLM Analysis X C Subject 4 Preprocessing MC, STC, B0 Smoothing Normalization Raw Data 39 First Level GLM Analysis X C X C Second-Level Modeling • These are all random effects (because of variance corrections and using beta’s from the first level) • Mean across subjects divided by variance across subjects. – Low subjects with very low variance between them can lead to a significant finding, even if no subject was significant at the single subject level – Implications for analysis (e.g. SLBT??) Statistical Tests Implementing the T-test c = +1 0 0 0 0 0 0 0 t-test H0: cTb = 0 contrast of estimated parameters T= variance estimate Variance Estimate Sqrt(Var*cT(XTX)-1c) Implementing the F-test c= 00100000 00010000 00001000 00000100 00000010 00000001 H 0 : cT b = 0 additional variance accounted for by effects of interest F= error variance estimate Contrasts and the Full Model y = Xb n, y = s n, n ~ N (0, n2 ) bˆ = ( X T X ) 1 X T y Parameter Estimates T ˆ n nˆ 2 ˆ n = DOF gˆ = Cbˆ Residual Variance Contrast 1 ˆ ˆ g = g = C ( X T X ) 1 C T ˆ n2 Contrast Variance Estimate J J = Rows in C gˆ Cbˆ t DOF = = t - Test (univariat e) T 1 T 2 ˆ g C ( X X ) C ˆ n 2 FDOF,J = gˆ T ˆ g 1gˆ F - Test (multivari ate) T/r/F Notes • If F is a single row contrast, then F=T^2 • An F-test has no direction • In many programs, T-tests are one-tailed, thus have a p-value half of the same F-test • There are formulas to convert between T/r and other statistics (e.g. cohen’s d) • To avoid double-dipping, when you extract an ROI to plot the correlation and get the correlation value, DO NOT make inferences from the plots, but from the voxel-wise analysis. Contrasts • Identify the Null Hypothesis – Ho: A=B • Make the Null Hypothesis equal 0 – Ho: A-B=0 • Identify the columns for A and B, apply their weights – Ho: 1*A+(-1)*B – Contrast [1 -1] Contrasts • What if A and B are not individual columns as in the case of A1,A2,B1,B2… – [1 1 -1 -1] would work, but will over estimate the magnitude of the effect – A is the average A1 A2, or Ho: (A1+A2)/2=0 • [½ ½ 0 0] – B is the average B1 B2, or Ho: (B1+B2)/2=0 • [0 0 ½ ½] – [½ ½ -½ -½] Higher Level GLM Analysis (Low-Level Contrasts) Observations y = X * b 1 1 1 1 1 Design Matrix (Regressors) Data from one voxel 51 = One-Sample Group Mean (OSGM) G bG bG Vector of Regression Coefficients (“Betas”) Contrast Matrix: C = [1] Contrast = C*b = bG Two Groups GLM Analysis (Low-Level Contrasts) Observations y Data from one voxel 52 = X * b = 1 1 1 0 0 0 0 0 1 1 bG1 bG2 Contrasts: Two Groups GLM Analysis 1. Does Group 1 by itself differ from 0? Ho: bG1=0; Contrast = C*b = bG1; C = [1 0] 2. Does Group 2 by itself differ from 0? Ho: bG2=0; Contrast = C*b = bG2; C = [0 1] 53 = 3. Does Group 1 differ from Group 2? Ho: bG1= bG2; Contrast = C*b = bG1- bG2; C = [1 -1] 4. Does either Group 1 or Group 2 differ from 0? C has two rows: F-test (vs t-test) 1 0 Concatenation of contrasts #1 and C= #2 0 1 1 1 1 0 0 0 0 0 1 1 bG1 bG2 One Group, One Covariate (Age) y = X * b (Low-Level Contrasts) Observations Contrast = Data from one voxel 54 1 1 1 1 1 21 bG 33 bAge 64 17 47 Intercept: bG Slope: bAge Age Contrasts: One Group, One Covariate 1. Does Group offset/intercept differ from 0? Does Group mean differ from 0 regressing out age? Ho: bG=0; Contrast = C*b = bG; C = [1 0], (Treat age as nuisance) Contrast 2. Does Slope differ from 0? Ho: bAge=0; Contrast = C*b = bAge; C = [0 1] = 1 1 1 1 1 21 33 64 17 47 Intercept: bG Slope: bAge Age 55 bG bAge Contrasts: One Group, One MeanCentered Covariate 1. Does Group offset/intercept differ from 0? Does Group mean differ from 0 regressing out age? Ho: bG=0; Contrast = C*b = bG; C = [1 0], (Treat age as nuisance) Contrast 2. Does Slope differ from 0? Ho: bAge=0; Contrast = C*b = bAge; C = [0 1], ** Same effect as non-mean centered covariate = 1 1 1 1 1 -15 -3 28 -20 11 Mean: bG Slope: bAge Age 56 bG bAge Group Effects 1. Does Activity vary with Disease Status? 2. Does Activity vary with Gender? 1. Is there an Interaction between DS and G? 2x2 Group ANOVA 10 5 While this design matrix was generated in SPM, you could generate it in any of the MRI Analysis packagees or statistical programs. 13 9 Contrasts • Does Activity vary by Disease Status? – – – – Ho: DS-=DS+ Ho: DS- - DS+ =0 [½ ½ -½ -½]; (group difference based on subgroups) or [10/15 5/15 -13/22 -9/22] (pure average of subjects) • Does Activity vary by Gender? – – – – Ho: Male=Female Ho: Male - Female =0 [½ -½ ½ -½]; or (group difference based on subgroups) or [10/23 -5/14 13/23 -9/14] (pure average of subjects) Contrasts • Average of Subgroups versus Average of Individuals – If you have drawn a random sample and want to talk generally about all subjects in a group, use the contrast weighted by group size. – If you haven’t drawn a random sample or want to look at the average effect of the group, then you want to use the contrast that is not weighted by group size. Contrasts • Is there an interaction? – – – – Ho: DS-Females-DS-Males= DS+Females-DS+Males Ho: (DS-Females-DS-Males) – (DS+Females-DS+Males)=0 Ho: DS-Females-DS-Males – DS+Females+DS+Males=0 [1 -1 -1 1]; or • Are the groups different? – – – – – – Ho: DS-Females=DS-Males=DS+Females=DS+Males F-test DS-Females=DS-Males [1 -1 0 0] DS-Males=DS+Females [0 1 -1 0] DS+Females=DS+Males [0 0 1 -1] [1 -1 0 0; 0 1 -1 0; 0 0 1 -1] Contrasts • If there is an interaction, you can not interpret the effects of the individual factors (e.g. disease and gender) GLM • Important to model all known variables, even if not experimentally interesting: – e.g. head movement, block and subject effects – minimise residual error variance for better stats – effects-of-interest are the regressors you’re actually interested in covariates conditions: effects of interest Contrasts: Two Groups GLM Analysis 1. Does Group 1 by itself differ from 0? Ho: bG1=0; Contrast = C*b = bG1; C = [1 0] 2. Does Group 2 by itself differ from 0? Ho: bG2=0; Contrast = C*b = bG2; C = [0 1] 64 = 3. Does Group 1 differ from Group 2? Ho: bG1= bG2; Contrast = C*b = bG1- bG2; C = [1 -1] 4. Does either Group 1 or Group 2 differ from 0? C has two rows: F-test (vs t-test) 1 0 Concatenation of contrasts #1 and C= #2 0 1 1 1 1 0 0 0 0 0 1 1 bG1 bG2 One Group, One Covariate (Age) y = X * b (Low-Level Contrasts) Observations Contrast = Data from one voxel 65 1 1 1 1 1 21 bG 33 bAge 64 17 47 Intercept: bG Slope: bAge Age Contrasts: One Group, One Covariate 1. Does Group offset/intercept differ from 0? Does Group mean differ from 0 regressing out age (mean-centered)? Ho: bG=0; Contrast = C*b = bG; C = [1 0], (Treat age as nuisance) Contrast 2. Does Slope differ from 0? Ho: bAge=0; Contrast = C*b = bAge; C = [0 1] = 1 1 1 1 1 21 33 64 17 47 Intercept: bG Slope: bAge Age 66 bG bAge One Group, One Covariate (http://mumford.fmripower.org/mean_centering/) Two Groups Activity Intercept: b1 Slope: m1 Do groups differ in Intercept? Do groups differ in Slope? Is average slope different than 0? … Slope: m2 Age Intercept: b2 Two Groups Activity Intercept: b1 Slope: m1 Slope: m2 Age Intercept: b2 y11 1 0 y12 1 0 = y21 0 1 y22 0 1 x11 0 * x12 0 0 x21 0 x22 b1 b2 m1 m2 Y = X*b y11 = 1*b1 + 0*b2 + x11*m1 + 0*m2 y12 = 1*b1 + 0*b2 + x12*m1 + 0*m2 y21 = 0*b1 + 1*b2 + 0*m1 + x21*m2 y22 = 0*b1 + 1*b2 + 0*m1 + x22*m2 Two Groups, One Covariate • Somewhat more complicated design • Slopes may differ between the groups • What are you interested in? • Differences between intercepts? Ie, treat covariate as a nuisance? • Differences between slopes? Ie, an interaction between group and covariate? 70 Two Groups, One (Nuisance) Covariate Is there a difference between the group means? Synthetic Data 71 Two Groups, One (Nuisance) Covariate Raw Data Effect of Age Effect After Age “Regressed Out” (e.g. Age=0) • No difference between groups • Groups are not well matched for age • No group effect after accounting for age • Age is a “nuisance” variable (but important!) • Slope with respect to Age is same across groups •If age was mean-centered, there might be a group effect!!! 72 •Depends on mean-centering… Two Groups, One (Nuisance) Covariate (Low-Level Contrasts) Observations y Data from one voxel 73 Different Offset Same Slope (DOSS) = X * b = 1 1 1 0 0 0 0 0 1 1 21 33 64 17 47 bG1 bG2 bAge One regressor for Age. Two Groups, One (Nuisance) Covariate = 74 1 1 1 0 0 0 0 0 1 1 Different Offset Same Slope (DOSS) 21 33 64 17 47 bG1 bG2 bAge One regressor for Age indicates that groups have same slope – makes difference between group means/intercepts independent of age. Contrasts: Two Groups + Covariate 1. Does Group 1 intercept/mean differ from 0 (after regressing out effect of age)? Ho:bG1=0, Contrast = C*b = bG1, C = [1 0 0] 2. Does Group 2 intercept/mean differ from 0 (after regressing out effect of age)? Ho:bG2=0, Contrast = C*b = bG2, C = [0 1 0] = 1 1 1 0 0 0 0 0 1 1 21 33 64 17 47 3. Does Group 1 intercept/mean differ from Group 2 intercept/mean (after regressing out effect of age)? Ho: bG1=bG2, , Contrast = C*b = bG1- bG2, C = [1 -1 0] 4. Does Slope differ from 0 (after regressing out the effect of group)? Does not have to be a “nuisance”! Ho: bAge=0, Contrast = C*b = bAge, C = [0 0 1] 75 bG1 bG2 bAge Two-Groups, One Covariate, Same Slope Model from previous slide 3 4 1,2 (http://mumford.fmripower.org/mean_centering/) Group/Covariate Interaction Two Groups, One Covariate, Different Slopes • Slope with respect to Age differs between groups • Interaction between Group and Age • Intercept different as well 77 Group/Covariate Interaction (Low-Level Contrasts) Observations y Data from one voxel 78 Different Offset Different Slope (DODS) = X * b = 1 1 1 0 0 0 0 0 1 1 21 0 33 0 64 0 0 17 0 47 bG1 bG2 bAge1 bAge2 Group-by-Age Interaction Group/Covariate Interaction 1. Does Slope differ between groups? Is there an interaction between group and age? Ho: bAge1=bAge2, Contrast = C*b = bAge1bAge2, C = [0 0 1 -1], 79 1 1 1 = 0 0 0 21 0 0 33 0 0 64 0 1 0 17 1 0 47 bG1 bG2 bAge1 bAge2 Group/Covariate Interaction Does this contrast make sense? 2. Does Group 1 intercept/mean differ from Group 2 mean (after regressing out effect of age)? Ho: bG1- bG2, Contrast = C*b = bG1- bG2, C = [1 -1 0 0] Very tricky! This tests for difference at Age=0 What about Age = 12? What about Age = 20? 80 1 1 1 = 0 0 0 21 0 0 33 0 0 64 0 1 0 17 1 0 47 bG1 bG2 bAge1 bAge2 Group/Covariate Interaction If you are interested in the difference between the means but you are concerned there could be a difference (interaction) in the slopes: 1. Analyze with interaction model (DODS*) 2. Test for a difference in slopes 3. If there is no difference, re-analyze with single regressor model (DOSS*) 4. If there is a difference, proceed with caution 81 * Freesurfer terms Group/Covariate Interaction Model from previous slide 2 1 (http://mumford.fmripower.org/mean_centering/) Mean Centering • Across ALL subjects – Covariate-adjusted group means • Within each group – Each group would have the same mean as a one-sample ttest • Why does it matter? – The interpretation changes – Correlation between group and covariate (e.g. MMSE and Alzheimer’s diagnosis) Covariates • If you have a single group: – Demeaning covariate will not change the slope – Demeaning makes the group term the mean of the group; whereas not demeaning makes the group term the intercept. Covariates • If you have a multiple groups: – Demeaning covariate will not change the slope, no matter how you demean it – Demeaning within each group controlling for the covariate, but group means are uneffected – Demeaning across everyone controlling for the covariate, but group means are effected. If you do this, you should refer to group tests as a comparison of covariate-adjusted means Longitudinal/Repeated-Measures Did something change between visits? • Drug or Behavioral Intervention? • Training? • Disease Progression? • Aging? • Injury? • Scanner Upgrade? • Multiple tasks in the same session? 87 Longitudinal Subject 1, Visit 1 Subject 1, Visit 2 Paired Differences Between Subjects 88 Longitudinal Paired Analysis (V1-V2 Differences in Low-Level Contrasts) Observations y = X * b = 1 1 1 1 1 Design Matrix (Regressors) Paired Diffs from one voxel 89 One-Sample Group Mean (OSGM): Paired t-Test bDV Ho: bDV=0 Contrast = C*b = bDV Contrast Matrix: C = [1] GLM – Paired T-Test GLM – Repeated Measures Constructing Contrasts Constructing Contrasts • What is the null hypothesis? • Make the null hypothesis equal to 0 • Label the columns based on the weighting of the components of the null hypothesis – For repeated measures, form the sub-elements of the contrast, then apply the weights Constructing Contrasts • • • • • S1G1C1: [1 zeros(1,10) 1 0 1 0 0 1 0 0 0 0 0] S1G1C2: [1 zeros(1,10) 1 0 0 1 0 0 1 0 0 0 0] S2G1C1: [0 1 zeros(1,9) 1 0 1 0 0 1 0 0 0 0 0] G1: [ones(1,6)/6 zeros(1,5) 1 0 1/3 1/3 1/3 1/3 1/3 1/3 0 0 0] G1vsG2: [ones(1,6)/6 ones(1,5)/5 1 -1 0 0 0 1/3 1/3 1/3 -1/3 -1/3 1/3] – (NOTE: This is not a valid contrast, even though it can be constructed.) Contrast Validity • Do you only have between-subject factors? – All contrasts valid • Do you only have within-subject factors? – Any contrast comparing levels of a factor/interaction is valid – Effect of a single level is not valid • Do you have between- and within-subject factors? – Any contrast comparing levels of a factor/interaction is valid – Interaction contrasts are valid – Group/between-subject effects are not valid (e.g. G1vG2) – Effect of a single level is not valid Constructing Contrasts • • • • • • • • • S1G1C1: [1 zeros(1,10) 1 0 1 0 0 1 0 0 0 0 0] S1G1C2: [1 zeros(1,10) 1 0 0 1 0 0 1 0 0 0 0] S2G1C1: [0 1 zeros(1,9) 1 0 1 0 0 1 0 0 0 0 0] G1C1: [ones(1,6)/6 zeros(1,5) 1 0 1 0 0 1 0 0 0 0 0] G2C1: [zeros(1,6) ones(1,5)/5 0 1 1 0 0 0 0 0 1 0 0] *C1:[ones(1,6)/12 ones(1,5)/10 1/2 1/2 1 0 0 1/2 0 0 1/2 0 0] *C1:[ones(1,11)/11 5/11 6/11 0 0 5/11 0 0 6/11 0 0] C1vsC2: [zeros(1,11) 0 0 1 -1 0 1/2 -1/2 0 1/2 -1/2 0 ] C1vsC2: [zeros(1,11) 0 0 1 -1 0 5/11 -5/11 0 6/11 -6/11 0 ] Power Calculations • The probability that the test will reject the null hypothesis, when the null hypothesis is false. • In general, you want to say that you have 8090% power in your study. • Estimate your effect size, specify your power, determine the sample size needed. • CANNOT BE DONE POST-HOC!!! Power Calculations • Estimate your effect size – Which brain region? • Minimum N to achieve % power in a set of regions (McLaren et al. 2010) – Where to find effect sizes? • Previous studies, pilot studies • Specify your power (option A) – The higher the better, but more power means a larger N • Specify your N (option B) – Increasing N will increase the power Power Calculations - $7600 study (Mumford et al. 2008) Programs • G*Power • http://fmripower.org/ • http://fmri.wfubmc.edu/cms/talkPowerSampl eSizeCalculation voxel-wise Caveat 1: What is analyzed… • Missing Data – NaN – Zeros Also AFNI/FSL Caveat 2: Designs • Between-subject Designs • Within-subject Designs • Mixed Designs Pick your design Carefully All of these designs test the same effect; however only the top 2 give you the correct RFX results and are generalizable to the population. The top right model is a variant of the GLM that creates a second error term (more on this next week). Pick your design Carefully Variance Corrections • The issue of non-sphericity Repeated Measures in FSL • Limited to designs that have no violations of sphericity. Misc. Considerations Correction for Multiple Comparisons • Cluster-based – Monte Carlo simulation – Permutation Tests – Surface Gaussian Random Fields (GRF) • There but not fully tested • False Discovery Rate (FDR) – built into tksurfer and QDEC. (Genovese, et al, NI 2002) Clustering 1. Choose a voxel/vertex-wise threshold • • Eg, 2 (p<.01), or 3 (p<.001) Sign (pos, neg, abs) 2. A cluster is a group of connected (neighboring) voxels/vertices above a threshold 3. Cluster has a size (volume in mm3 and area in mm2) p<.01 (-log10(p)=2) Negative p<.0001 (-log10(p)=4) Negative What to report in papers • Be explicit about the model – What are the factors – What are the covariates – What did you set as the variance and dependence for each factor • Be explicit about the contrast you are using • Be explicit about how to interpret the contrast – Group means, group intercepts, covariate adjusted group means • Be explicit about the thresholds used – Corrections for multiple comparisons – Small Volume Correction (corrected in SPM8 in late Feb. 2012) SPM/FSL/AFNI/CUSTOM • It is important to recognize that all programs that utilize the GLM will produce the same result. However, if your design matrices or variance correction methods are different, then you will see differences. • Some slides show illustrations from FSL, others show illustrations from SPM, MATLAB, or other software. These can be done in all programs. Useful Mailing Lists • SPM – http://www.jiscmail.ac.uk/list/spm.html • FSL -- http://www.jiscmail.ac.uk/list/fsl.html • Freesurfer -http://surfer.nmr.mgh.harvard.edu/fswiki/FreeSurferSupport • CARET -http://brainvis.wustl.edu/wiki/index.php/Caret:Mailing_List • I highly recommend reading the posts on these lists as they will save you time in the future.