Hi VM,Please see below:On 4 January 2017 at 21:46, neuroimage analyst <[log in to unmask]> wrote:Hi, Anderson.Thank you for your response.I am still unclear how to set the contrasts for race (EV5 to EV9) and I will appreciate if you could please commentAre these contrasts correct?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,0,0,0,0,0, 0,0,0,0,0,00,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,0,0,0,0, 0,0,0,0,0,00,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,0,0,0, 0,0,0,0,0,00,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,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,0, 0,0,0,0,0,0Almost. For EV5 to EV9, the F-test would be:0,0,0,0,1,0,0,0,0,0,...0,0,0,0,0,1,0,0,0,0,...0,0,0,0,0,0,1,0,0,0,...0,0,0,0,0,0,0,1,0,0,...0,0,0,0,0,0,0,0,1,0,...To enter it, these lines would have to appear in the design.con file. Suppose the design.con file has 10 lines, with these above being the last 5. Then to specify the F-test, the design.fts would have to have one line that is:0 0 0 0 0 1 1 1 1 1That is, one line for each F-test (one in this case), each with 10 digits (for the 10 contrasts in the .con file), with zeroes and ones indicating which of them would constitute the F-test. This is exactly the same way as randomise uses F-tests, and these files can be generated automatically with the command Glm (or Glm_gui in the Mac), such that you don't have to worry about creating them by hand.Alternatively, it's possible to use the .mset files, i.e., a single text file containing all t and F-contrasts. This is described here: https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/PALM/UserGuide#Suppor t_for_MSET_files The benefit of using .mset files is that the contrasts are run exactly as entered, and for F-tests, only the actual F-test is run, as opposed to each of its rows as a separate t-test.then f- test as1 1 ? with no additional 0s? Also do I have to create another -t for race followed by -f meaningpalm -i input -d design.mat -t design_without_race -t only_race -f f_for_race OR palm -i input -d design_with_race.mat -f f_for_racepalm -i input -d design.mat -t design.con -f design.fts [...]orpalm -i input -d design.mat -con design.mset [...]Second, I want to test subcortical volumes (as csv) in the same call to palm. so my understanding is I can add -i subcortical.csv? Since, I invoke -tfce2D for surfaces; subcortical will also work with 2D which may be not right. Then how do I modify the call to palm?The benefit of using the subcortical volumes in the same call is to correct for multiple testing. However, TFCE isn't a pivotal statistic and multiple testing correction here will not work as expected. So, either:a) Put subcortical in the same call (-i subcortical.csv), add -corrmod, and drop TFCE.or:b) Use TFCE for the cortical area and thickness, but run PALM separately for subcortical volumes.Third, in the contrast of 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 , if I find Con>grp1 can I say that controls had a higher thickness than grp 1 after controlling for other covariates?If EV1 codes for Con and EV2 codes for group 1, yes.Fourth, I need to test if thickness and perfusion, and perfusion and subcortical volumes have any relationship among them for any group? Can I use a single palm call to achieve this or I have to call palm 2 more times with -evperdat option? Also, subcortical volumes are not ev per voxel, how do I achieve testing for the association between subcortical volume and perfusion? Hopefully there is a way for one call to palm and test for everything. I will greatly appreciate your inputs.For thickness vs. perfusion, both being vertexwise, you'd use vertexwise EVs with the option -evperdat.For perfusion vs. subcortical volumes, you'd use perfusion as input (-i), and multiple designs, one for each subcortical structure, then enter these multiple designs in a single call (-d multiple times). If the designs have all identical structure (size, order of EVs, etc), varying only the EV that has the volume of a given structure, the contrasts (-t, -f, -con) can be the same for all designs. Use then the option -corrmod to correct across all contrasts and all designs.Hope this helps!All the best,AndersonThank youRegards--VMOn Wed, Jan 4, 2017 at 3:32 AM, Anderson M. Winkler <[log in to unmask]> wrote:Hi VM,Please see below:On 30 December 2016 at 23:01, neuroimage analyst <[log in to unmask]> wrote:Hi,I wish to compare cortical thickness across 3 groups (Control, and 2 patient groups). There are six different type of races that 3 groups belong to + gender. The 2 patient groups themselves have 2 subdivisions between them (SubGroup1 and SubGroup2). There are additional covariates of age, education, MoCA, disease score 1, disease score2, disease score 3, and ICV.I have constructed the following design matrix and contrast matrix and will appreciate if somebody could comment if this is right.Design Matrix:EV1: InterceptEV2: Controls/Group1 = -1/+1; Group2=0;EV3: Controls/Group2 = -1/+1; Group1 = 0EV4: Male/Female = 1/-1EV5: RaceA/RaceB = -1/+1; Race C through F = 0;EV6: RaceA/RaceC = -1/+1; All other races 0EV7: RaceA/RaceD = -1/+1; All other races 0EV8: RaceA/RaceE = -1/+1; All other races 0EV9: RaceA/RaceF = -1/+1; All other races 0EV10: Patient Subgroup1/Patient SubGroup 2 = -1/+1; Control =0EV11: EV2*EV5EV12: EV2*EV6EV12: EV2*EV7EV13: EV2*EV8EV14: EV2*EV9EV15: EV3*EV5EV16: EV3*EV6EV17: EV4*EV7EV18: EV3*EV8EV19: EV3*EV9EV20: AgeEV21: educationEV22: EV2*EV23EV23: EV3*EV23EV24: MoCA for Controls; 0 for other groupEV25: MoCA for Grp1; 0 for other groupEV26: MoCA for Grp2; 0 for other groupEV27: disease score1 for Controls; 0 for other groupEV28: disease score1 for Grp1; 0 for other groupEV29: disease score1 for Grp2; 0 for other groupEV30: disease score2 for Controls; 0 for other groupEV31: disease score2 for Grp1; 0 for other groupEV32: disease score2 for Grp2; 0 for other groupEV33: disease score3 for Controls; 0 for other groupEV34: disease score3 for Grp1; 0 for other groupEV35: disease score3 for Grp2; 0 for other groupEV36: ICVOn a quick skim this seems right. However, you may want to split the patient subgroups (EV10) into two EVs, one for each patient group.Another thing is that, in seeing the whole thing, it seems more logical and easier to construct the contrasts if the intercept were dropped and the 3 groups (controls, patients 1, patients 2) had each its own EV (coded as 0 and 1). The contrasts for the group comparisons can then be simple comparisons as [1 -1 0 0 ...] and so on.Contrast Matrix:a) Test if there are any differences between the groups after regressing out other effectsGrp1>Con : 0,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0 Grp1<Con : 0,-2,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0 Grp2>Con : 0,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0 Grp2<Con : 0,-1,-2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0 Grp1>Grp2 : ,0,1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0 Grp1<Grp2 : 0,-1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ,0,0,0,0,0,0 Looks right.b) Test if there are any differences due to education between the groups after regressing out other effectseducation Grp1>Con : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0, 0,0,0,0,0,0 education Grp1<Con : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,-1,0,0,0,0,0,0, 0,0,0,0,0,0,0 education Grp2>Con : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0, 0,0,0,0,0,0 education Grp2<Con : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-2,0,0,0,0,0,0, 0,0,0,0,0,0,0 education Grp1>Grp2 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,-1,0,0,0,0,0,0,0 ,0,0,0,0,0,0 education Grp1>Grp2 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,1,0,0,0,0,0,0,0 ,0,0,0,0,0,0 Looks right, but education by group interaction could have been coded in the same manner as MoCA and the disease scores (as below).c) Test if there are is any association between MoCA within groupMoCA Con >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0, 0,0,0,0,0,0 MoCA Con<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0,0,0 ,0,0,0,0,0,0 MoCA Grp1 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0, 0,0,0,0,0,0,0 MoCA Grp1 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0,0 ,0,0,0,0,0,0,0 MoCA Grp2 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0, 0,0,0,0,0,0,0 MoCA Grp2 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0 ,0,0,0,0,0,0,0 d) Test if there are is any association between disease score 1 within groupDisease Score1 Con : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0, 0,0,0,0,0,0,0 Disease Score1 Con<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0,0 ,0,0,0,0,0,0 Disease Score1 Grp1 >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0, 0,0,0,0,0,0 Disease Score1 Grp1<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0,0 ,0,0,0,0,0,0 Disease Score1 Grp2 >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0, 0,0,0,0,0,0 Disease Score1 Grp2<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2,0 ,0,0,0,0,0,0 e) Test if there are is any association between disease score2 within groupDisease Score2 Con >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2, 0,0,0,0,0,0 Disease Score2 Con<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-2 ,0,0,0,0,0,0 Disease Score2 Grp1 >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 2,0,0,0,0,0 Disease Score2 Grp1<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -2,0,0,0,0,0 Disease Score2 Grp2 >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,2,0,0,0,0 Disease Score2 Grp2<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,-2,0,0,0,0 e) Test if there are is any association between disease score2 within groupDisease Score3 Con >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,2,0,0,0 Disease Score3 Con<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,-2,0,0,0 Disease Score3 Grp1 >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,2,0,0 Disease Score3 Grp1<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,-2,0,0 Disease Score3 Grp2 >0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,2,0 Disease Score3 Grp2<0 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,-2,0 f) How to test if there are any differences due to race between the groups after regressing out other effectsCreate one t-test for each of the EVs that test the race pairs (so, one contrast for each of EV5 through EV9), then an F-test that encompasses all these. This will test for any effect on any direction.Questions:1) Does the design matrix and contrast matrix makes sense? There are in total 16 controls, 40 grp1, and 140 grp2 subjects?Yes, although, as indicated above, it could be made simpler (or less error prone) if in this case the intercept is dropped and the 3 groups coded separately.2) This is my call to PALM. Is the call correct?palm -i bh.thickness.mgz -i bh.area.mgz -i bh.volume.mgz -i bh.cbf.mgz -d design.mat -t design.con -o bh.results -n 1000 -corrcon -corrmod -approx tail -nouncorrected -s bh.white -T -tfce2D -logpYes, looks right.3) How to test if there are any differences due to race between the groups after regressing out other effects? -- Contrast matrix? Can I use an f test here? If yes, how should I pass the argument into PALM call above?Yes, as indicated above. To pass the F-test use the option -f, just as you would in randomise.4) With so many contrasts and using -corcon option, I am going to lose a lot of power? Can the contrast matrix be simplified to test what I want to test?Yes, you can remove beforehand hypotheses or tests that are not relevant or meaningful, although in this case it seems all of them are plausible and presumably could be investigated.5) How do I get FDR corrected p-value for the call to PALM above?Add the option -fdr.6) Since the intercept is present in the model, my understanding is I don't have to demean the regressors in the design matrix, Is that right?Yes. And if you drop the intercept as indicated above, replacing it (and the two other group EVs) for a new set of 3 EVs, the intercept will still be present, albeit split across the 3 regressors, such that demeaning is still not necessary.Hope this helps.All the best,AndersonThank you for any response. I will greatly appreciate it.Regards and a Happy new year!-- VM