Dear Yingying, According to your message, "randomise" program can not handle two error > terms (between subjects and within subject). In the future, will > "randomise" be updated to handle these kind of data? > Not in the near future. Repeated measures correlation is difficult enough in the parametric case; it's even trickier for the non-parametric case. So, look for feat or fsl_glm handling repeated measures before randomise. > I tried to use "randomise" to model two time points as repeated measures > and perform general linear model (GLM) voxel-wise statistical analysis as > follows: > This won't work, not specifically because of a randomise problem, but because of the limitation of fitting repeated measures with OLS. In the language Donald set out, this is a "within-subject design" (you have repeated measures) but you have between-subject effects you want to make inference on (age, sex, age*sex). Randomise can only handle this kind of design in the special case of a paired t-test. Fortunately, it's easy to work around this... you just need to average each subject's pair of scans, and then run a model with just one scan per subject, where you can test for the age, sex & age*sex effects you desire. (You can also construct difference images from each subject's pairs and fit the same effects, telling you about the impact of these effects on longitudinal change). -Tom > Would you mind taking a look at it? > > 8 boys and 8 girls, two scans (average interval 1 year): > y=sex+age+sex*age. > > randomise -i all_FA_skeletonised.nii.gz -o FA_tbss_stats -m mea > n_FA_skeleton_mask -d design.mat -t design.con -e design.grp -n 1000 --T 2 > -V > > Files: > design.mat > Column 1: sex group(-1,female;1:male), Column 2: demeaned age in years, > Column 3: Column 1*Column 2 > Column 4-19: measures > > /NumWaves 19 > /NumPoints 32 > > /Matrix > -1 -1.2879 1.2879 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > -1 -2.0414 2.0414 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > -1 0.1066 -0.1066 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 > -1 0.7285 -0.7285 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 > -1 0.1258 -0.1258 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 > -1 0.5888 -0.5888 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 > -1 -1.4852 1.4852 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 > -1 -1.8003 1.8003 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 > -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0 > 1 1.1943 1.1943 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 > 1 2.0984 2.0984 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 > > > design.con > /ContrastName1 "sex" > /ContrastName2 "age" > /ContrastName3 "sex*age" > /NumWaves 19 > /NumContrasts 3 > > /Matrix > 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 > > design.grp > /NumWaves 1 > /NumPoints 32 > > /Matrix > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 1 > 2 > 3 > 4 > 5 > 6 > 7 > 8 > 9 > 10 > 11 > 12 > 13 > 14 > 15 > 16 > 9 > 10 > 11 > 12 > 13 > 14 > 15 > 16 > > Thanks a lot, > -Yingying > > > =========================================================== > *Yingying Wang*, Graduate Student, Biomedical Engineering, University > of Cincinnati. > Pediatric Neuroimaging Research Consortium, Cincinnati Children's Hospital > Medical Center. > MLC 5033, 3333 Burnet Avenue, Cincinnati, OH 45229-3039, United States. > O: 513-636-3495 C: 513-833-7448 Email: [log in to unmask] > Blog: http://wang2yg.blogspot.com Homepage: > http://homepages.uc.edu/~wang2yg > =========================================================== > > >>> Thomas Nichols <[log in to unmask]> 11/16/2011 9:48 AM >>> > Yingying ( & Donald & Jay) > > Sorry to confuse things, but as Donald just pointed out to me off-list, > you have a 2x2 mixed design and so what I say below (regarding a paired > t-test) is irrelevant. Donald is correct, since you have one *between* > subject factor (in addition to a within subject factor) randomise cannot > fit this data with this model. > > The only way to analyze this presently is fit three separate models, as > Donald and others frequently prescribe: Average the pairs, and fit a > two-sample t-test to get main effect of group; difference the pairs, and > fit a one-sample t-test to get the main effect of baseline/follow up; and > fit the difference data with a two-sample t-test to get the interaction. > > Sorry for the mix up! > > -Tom > > > n Wed, Nov 16, 2011 at 10:37 AM, Thomas Nichols <[log in to unmask] > > wrote: > >> Hi Donald, >> >> The paired t-test is the *one* repeated measures design that randomise (& >> FEAT, etc) can do exactly. It is crucial that the -e option is used to >> specify that there are Nsubj exchangeability blocks. That is, under the >> null hypothesis of no difference between measurement 1 and 2, it is >> entirely valid to permute *within* *subject*. This is true even if there is >> strong correlation within subject. Disastrous, uninterpretable results will >> occur, though, if exchangeability blocks are not set with -e or if they are >> set incorrectly. >> >> In fact, if we were just doing one, single-voxel permutation test, we >> could *even* omit the subject blocking variables from the model, and let >> all that between subject variance end up in the denominator of the test >> stat. The test statistic wouldn't follow any parametric distribution, but >> (intrasubject) permutation would find the same P-values as when the block >> variables are included (because the between subject variance corrupting the >> denominator is the same for every permutation). We *don't* do this because >> we need test statistics to be comparable over voxels ('pivotal' is the >> official term), so we use the standard parametric model to create a >> traditional paired t-test test-statistic. >> >> Let me know if you were thinking of some other issue with randomise & >> repeated measures. >> >> -Tom >> >> >> On Tue, Nov 15, 2011 at 4:39 PM, MCLAREN, Donald < >> [log in to unmask]> wrote: >> >>> You can't use randomise for this type of analysis. Randomise only works >>> when you have one factor (group or time). When you have both, you can't get >>> the correct permutations. >>> >>> Best Regards, Donald McLaren >>> ================= >>> D.G. McLaren, Ph.D. >>> Postdoctoral Research Fellow, GRECC, Bedford VA >>> Research Fellow, Department of Neurology, Massachusetts General Hospital >>> and >>> Harvard Medical School >>> Office: (773) 406-2464 >>> >>> On Tue, Nov 15, 2011 at 11:37 AM, Yingying Wang < >>> [log in to unmask]> wrote: >>> >>>> You need to use "-e" option to define the exchangeability between the >>>> two time points. -e design.grp >>>> If the first 50 points are from your first time points, the second 50 >>>> points are from your second data points. Here is the example design.grp for >>>> randomise. The two scans are from the same subject. Thus, they might be >>>> correlated. You need to count for that. Otherwise, program will have >>>> problem with TFCE correction. It happened to me before. >>>> design.grp: >>>> should be the >>>> 1 >>>> 2 >>>> 3 >>>> .. >>>> 50 >>>> 1 >>>> 2 >>>> 3 >>>> ... >>>> 50 >>>> >>>> >>>> >>> SUBSCRIBE FSL Jay <[log in to unmask]> 11/15/2011 9:10 AM >>> >>>> >>>> Hello, >>>> >>>> I am trying to run randomise for repeated measures on baseline (50 >>>> scans) and followup data( 50 scans) as a paired analyses. In my design >>>> matrix , i have first 3 columns to model group, time, interaction followed >>>> by 50 columns to model the categorical effect. Hence, the size of design >>>> matrix is (100 X 53). I have attached the design matrix (design.mat). >>>> >>>> When i run randomise on my TBSS data using this design matrix, i get >>>> the following Warning ( i have pasted the terminal text below ). For some >>>> reason tfce is not able to handle it. Can you please explain why and what >>>> is the work around for this situation? >>>> >>>> >>>> ============================================================================ >>>> >>>> FIU-iMac08:stats jay$ randomise -i all_FA_skeletonised -o tbss -m >>>> mean_FA_skeleton_mask -d design.mat -t design.con -n 5000 --T2 -V >>>> randomise options: -i all_FA_skeletonised -o tbss -m >>>> mean_FA_skeleton_mask -d design.mat -t design.con -n 5000 --T2 -V >>>> Loading Data: >>>> Data loaded >>>> 9.32066e+28 permutations required for exhaustive test of t-test 1 >>>> Doing 5000 random permutations >>>> Starting permutation 1 (Unpermuted data) >>>> Starting permutation 2 >>>> Warning: tfce has detected a large number of integral steps. This >>>> operation may require a great deal of time to complete. >>>> >>>> >>>> ============================================================================ >>>> >>>> Regards >>>> Jay >>>> >>> >>> >> >> >> -- >> __________________________________________________________ >> Thomas Nichols, PhD >> Principal Research Fellow, Head of Neuroimaging Statistics >> Department of Statistics & Warwick Manufacturing Group >> University of Warwick, Coventry CV4 7AL, United Kingdom >> >> Web: http://go.warwick.ac.uk/tenichols >> Email: [log in to unmask] >> Phone, Stats: +44 24761 51086 <+44%2024761%2051086>, WMG: +44 24761 50752<+44%2024761%2050752> >> Fax: +44 24 7652 4532 <+44%2024%207652%204532> >> >> >> > > > -- > __________________________________________________________ > Thomas Nichols, PhD > Principal Research Fellow, Head of Neuroimaging Statistics > Department of Statistics & Warwick Manufacturing Group > University of Warwick, Coventry CV4 7AL, United Kingdom > > Web: http://go.warwick.ac.uk/tenichols > Email: [log in to unmask] > Phone, Stats: +44 24761 51086, WMG: +44 24761 50752 > Fax: +44 24 7652 4532 > > > -- __________________________________________________________ Thomas Nichols, PhD Principal Research Fellow, Head of Neuroimaging Statistics Department of Statistics & Warwick Manufacturing Group University of Warwick, Coventry CV4 7AL, United Kingdom Web: http://go.warwick.ac.uk/tenichols Email: [log in to unmask] Phone, Stats: +44 24761 51086, WMG: +44 24761 50752 Fax: +44 24 7652 4532