Print

Print


Thank you again for your responses- I will change my analysis accordingly
but I had some questions for clarification:

1a) For "group effect" I meant testing whether there is group A > group B
or group A < group B. How should I approach this? I was thinking of having
two between-subjects models such that 1 model would compare group A
condition 1 against all conditions of group B and another model comparing
group A condition 2 against all conditions of group B.

So in that case would the command line look like this: palm -i A1.<ext> -i
B1.<ext> -i B2.<ext> -i B3.<ext> -d design_a1vsB.csv -t contrasts_a1vsB.csv
*-ise* -n 5000 -logp [blah]

Then design matrix would look like the following:
1 0 0 0 0 0 0  1  1  1
1 0 0 0 0 0 0  -1  0  0
1 0 0 0 0 0 0  0  -1  0
1 0 0 0 0 0 0  0  0  -1
0 1 0 0 0 0 0  1  1  1
0 1 0 0 0 0 0  -1  0  0
0 1 0 0 0 0 0  0  -1  0
0 1 0 0 0 0 0  0  0  -1
The last three columns would represent- A1-vs-B1, A1-vs-B2, and A1-vs-B3.

1b) For the one-sample t-tests command line (in this case, for Group A) you
suggested- I just wanted to double-check whether I got the data correctly
prepared:

Command line: palm -I A1.<ext> -i A2.<ext> -d design_a1.csv -t
contrasts_a1.csv -ise -n 5000 -logp [blah]

For input A1.<ext> and A2.<ext> would they look like the following:

A1.<ext> & A2.<ext>
subject1 bh.thickness file for condition A1/A2
subject2 bh.thickness file for condition A1/A2
subject3 bh.thickness file for condition A1/A2
...and so on

Then for design_a1.csv, the file would look like this:

1 0 0 0 0 0 0 -1  1
1 0 0 0 0 0 0  1  -1
0 1 0 0 0 0 0 -1  1
0 1 0 0 0 0 0  1  -1
There would N number of columns corresponding to the number of subjects
times 2 (for condition A1 and condition A2) and the last two columns would
represent conditions A1 and A2.

And contrasts_A1.csv would look like this:
0 0 0 0 0 0 0  1  0
0 0 0 0 0 0 0  0  1


Thank you very much for all the information. And I apologize again for the
long email.

Best,
Julia Shin



On Wed, Aug 10, 2022 at 1:50 PM Matthew Webster <
[log in to unmask]> wrote:

> Dear Julia,
>                  If I understand your analysis correctly, you have two
> groups, each having a different number of conditions, and for each group
> you want to test if each of its conditions.display a positive or negative
> effect.
>
> The simplest approach here is to split your data by both group and
> condition and run a one-sample t-test ( similar to design_a1 from
> Anderson’s reply in the linked thread ), the command line would then be (
> e.g. for group A )
>
> palm -I A1.<ext> -i A2.<ext> -d design_a1.csv -t contrasts_a1.csv -ise -n
> 5000 -logp [blah]
>
> With contrasts_a1.csv defining both positive and negative contrasts.
>
> Add -corrmod to correct across conditions, -corrcon to correct across
> contrasts.
>
> I’m not sure how you’re defining “group effect” here, e.g. the average
> across all conditions?
>
> Note NPC may not explicitly be needed in this case ( Anderson would be
> able to clarify ).
>
> 2) For the second question, the same logic will apply ( it’s just a change
> in storage format )
>
> Hope this helps,
> Kind Regards
> Matthew
> --------------------------------
> Dr Matthew Webster
> FMRIB Centre
> John Radcliffe Hospital design
> University of Oxford
>
> > On 5 Aug 2022, at 08:37, Hye Min Shin <[log in to unmask]> wrote:
> >
> > Thank you for the response Matthew.
> >
> > So if I still want to NPC by still correct over both hemispheres, can I
> merge lh and rh into bh using palm_hemimerge and then split them later
> using palm_hemisplit as discussed in this thread:
> https://jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;42baf4dd.1608
> >
> > I also have a couple more questions if that is ok:
> >
> > 1) After going through the repeated measures anova tutorial, I wanted to
> try to apply PALM NPC in my analysis. I have 2 groups with group A having 2
> conditions (A1 and A2) and another group B with 3 conditions (B1,B2,B3). I
> ran all 5 conditions on each subject. At first I just wanted to analyze
> them by having 10 t-tests and 2 F-contrasts (looking for the effect of
> group A and the effect of group B) then correcting for multiple comparisons
> using PALM/NPC. Would this be a good choice for my analysis?
> >
> > I also considered using NPC to combine within-subject and
> between-subject models after reading this thread:
> https://jiscmail.ac.uk/cgi-bin/wa-jisc.exe?A2=ind1801&L=FSL&P=R60203&K=2
> >
> > I thought this would be more appropriate for my analysis but with how my
> conditions are set up, it looks unfeasible since I do not have blocks with
> the same size for whole-block EB.
> >
> > My initial idea for within block and whole block EB is the following:
> > 1 -subject 1 A1
> > 1 -subject 1 A2
> > 1 -subject 2 A1
> > 1 -subject 2 A2
> > 2 -subject 1 B1
> > 2 -subject 1 B2
> > 2 -subject 1 B3
> > 2 -subject 2 B1
> > 2 -subject 2 B2
> > 2 -subject 2 B3
> >
> > So would it be better to just stick with 10 t-tests and 2 F-tests using
> NPC?
> >
> >
> > 2) If I can go ahead with this joint NPC analysis, can I also use this
> on subcortical data?
> >
> > Sorry for these additional questions- your responses were very helpful
> to understand PALM/NPC and how I should analyze my study.
> >
> > Thank you in advance,
> > Julia Shin
> >
> > On Tue, Aug 2, 2022 at 3:37 AM Matthew Webster <
> [log in to unmask]> wrote:
> > Hello Julia,
> > Note NPC should not be used here as it requires all inputs to be aligned
> - and by definition the left and right hemispheres are un-aligned. The
> -corrcon and -corrmod options can still be used to correct over both
> hemispheres ( “modalities” ) and contrasts though.
> >
> > Kind Regards
> > Matthew
> > --------------------------------
> > Dr Matthew Webster
> > FMRIB Centre
> > John Radcliffe Hospital
> > University of Oxford
> >
> >> On 29 Jul 2022, at 14:00, Hye Min Shin <[log in to unmask]> wrote:
> >>
> >> No problem- I was able to successfully run the F-test using PALM with
> npc.
> >>
> >> So if I also wanted to correct for both right and left hemispheres
> while applying npc to correct for contrasts can I add "-corrmod" and
> "-npccon" to my palm command? For a repeated measures design like the one
> is FreeSurfer tutorial, would it be ok to only apply npc to correct for
> contrasts? Or do I also have to add "-corrcon" to correct for contrasts AND
> add "-npccon".
> >>
> >> The command would look like the following (as also noted in this tread-
> https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;42baf4dd.1608):
> >>
> >> palm -i lh.thickness.sm15.mgh -i rh.thickness.sm15.mgh -m lh/mask.mgh
> -m rh/mask.mgh -d design.mat -t design.con -f design.fts
> >>           -n 5000 -T -npc -corrmod -npccon -logp -approx tail
> -nouncorrected
> >>
> >> Best,
> >> Julia Shin
> >>
> >> On Wed, Jul 27, 2022 at 9:28 PM Matthew Webster <
> [log in to unmask]> wrote:
> >> Hello Julia,
> >> Ah - my mistake! The F-test is on the _first_ two t-contrasts so the
> F-contrast should be 1 1 0 0 as you say.
> >>
> >> Kind Regards
> >> Matthew
> >> --------------------------------
> >> Dr Matthew Webster
> >> FMRIB Centre
> >> John Radcliffe Hospital
> >> University of Oxford
> >>
> >>> On 27 Jul 2022, at 13:18, Hye Min Shin <[log in to unmask]> wrote:
> >>>
> >>> I apologize for sending this email again- I originally responded to
> Matthew's email from JISCM@il site and since I can't see the message
> thread I am posting my response through my school webmail.
> >>>
> >>> Thank you very much for your reply Matthew- I am currently trying to
> run PALM again with your suggested F-test matrix of 0 0 1 1. My question is
> what does the F-test matrix 0 0 1 1 mean here. I thought the columns of the
> F-test matrix would correspond to the rows of the t-test matrix. So if
> t-test matrix has row 1 with tp1-vs-tp2, row 2 with tp1-vs-tp3 then the
> F-test matrix would be 1 1 0 0 so that row 3 and row 4 of the t-test matrix
> which are tp2-vs-tp3 and subject mean would not be chosen. Also in my palm
> command I gave the option -cmcx and I was wondering if this would be an
> appropriate flag to use instead of -npccon as suggested in
> PALM/JointInference user guide. At first I did give -npccon option but I
> got an error so I switched to -cmcx as suggested in the message. Best,
> Julia Shin
> >>>
> >>> On Wed, Jul 27, 2022 at 8:15 PM Matthew Webster <
> [log in to unmask]> wrote:
> >>> Hello Julia,
> >>>                  You only need to include ( any ) 2 of the 3
> tp_x-vs-tp_y t-contrasts as the 3rd difference is implicitly included in
> the test - e.g. if there is no difference between tp1,tp2 and tp1,tp3 then
> by definition there is no difference between tp2,tp3.
> >>>
> >>> With reference to the Freesurfer link in your email, this would be
> equivalent to "Contrast 4 (tp-effect.mtx)" which in FSL/PALM terms would be
> F-contrast 0 0 1 1. The F-contrast in your email ( 1 1 1 1 ) as well as
> being rank-deficient, also includes the subject-mean t-contrast, which may
> or may not be what is intended.
> >>>
> >>> Kind Regards
> >>> Matthew
> >>>
> >>> --------------------------------
> >>> Dr Matthew Webster
> >>> FMRIB Centre
> >>> John Radcliffe Hospital
> >>> University of Oxford
> >>>
> >>> > On 27 Jul 2022, at 11:01, Hye Min Shin <[log in to unmask]> wrote:
> >>> >
> >>> > Hello experts,
> >>> >
> >>> > I am trying to run FSL PALM specifically NPC using the example from
> the freesurfer repeated measures anova tutorial page:
> https://surfer.nmr.mgh.harvard.edu/fswiki/RepeatedMeasuresAnova#Contrast4.28tp-effect.mtx.29
> >>> >
> >>> > This freesurfer tutorial has 3 subjects with 3 timepoints with the
> following design matrix (column1-3 are subjects 1-3 and column 4 is
> tp1-vs-tp3 and column 5 is tp1-vs-tp3):
> >>> >
> >>> >     1     0     0     1     1
> >>> >     1     0     0    -1     0
> >>> >     1     0     0     0    -1
> >>> >     0     1     0     1     1
> >>> >     0     1     0    -1     0
> >>> >     0     1     0     0    -1
> >>> >     0     0     1     1     1
> >>> >     0     0     1    -1     0
> >>> >     0     0     1     0    -1
> >>> >
> >>> > It also has 5 contrasts, 4 t-tests and 1 F-test.
> >>> >
> >>> > The design matrix for the t-tests is the following:
> >>> >
> >>> > 0 0 0 1 0            (tp1-vs-tp2)
> >>> > 0 0 0 0 1            (tp1-vs-tp3)
> >>> > 0 0 0 -1 1           (tp2-vs-tp3)
> >>> > 1 1 1 0 0             (is the subject mean == 0? )
> >>> >
> >>> > The design matrix for the F-test is the following:
> >>> > 1 1 1 1
> >>> >
> >>> > I wanted to run the F-test to see if there is a group effect or
> specifically in this case the effect of timepoint. However, whenever PALM
> tries to run the F-test using NPC it keeps saying the rank is deficient.
> >>> >
> >>> > I ran PALM using npc with the following command:
> >>> >
> >>> > palm -i ./lh.thickness.sm15.mgh -m ./a_glmfit-lh/mask.mgh -d
> ./a_glmfit-lh/palm-onetail-1.3-lh/design.mat -t
> ./a_glmfit-lh/palm-onetail-1.3-lh/design.con -f
> ./adni_glmfit-lh/palm-onetail-1.3-lh/design.fts -n 5000 -npc -cmcx -o
> ./a_glmfit-lh/palm_mv-lh -logp
> >>> >
> >>> >
> >>> > Is there something wrong with my F-test matrix or do I not need to
> run the F-test if I was able to run the t-tests on paired comparisons?
> >>> >
> >>> > Thank you in advance for your help
> >>> >
> >>> > Best,
> >>> > Julia Shin
> >>> >
> >>> >
> ########################################################################
> >>> >
> >>> > To unsubscribe from the FSL list, click the following link:
> >>> > https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >>> >
> >>> > This message was issued to members of www.jiscmail.ac.uk/FSL, a
> mailing list hosted by www.jiscmail.ac.uk, terms & conditions are
> available at https://www.jiscmail.ac.uk/policyandsecurity/
> >>>
> >>>
> ########################################################################
> >>>
> >>> To unsubscribe from the FSL list, click the following link:
> >>> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >>>
> >>> This message was issued to members of www.jiscmail.ac.uk/FSL, a
> mailing list hosted by www.jiscmail.ac.uk, terms & conditions are
> available at https://www.jiscmail.ac.uk/policyandsecurity/
> >>>
> >>> To unsubscribe from the FSL list, click the following link:
> >>> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >>>
> >>
> >>
> >> To unsubscribe from the FSL list, click the following link:
> >> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >>
> >>
> >> To unsubscribe from the FSL list, click the following link:
> >> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >>
> >
> >
> > To unsubscribe from the FSL list, click the following link:
> > https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >
> >
> > To unsubscribe from the FSL list, click the following link:
> > https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
> >
>
>
> ########################################################################
>
> To unsubscribe from the FSL list, click the following link:
> https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1
>
> This message was issued to members of www.jiscmail.ac.uk/FSL, a mailing
> list hosted by www.jiscmail.ac.uk, terms & conditions are available at
> https://www.jiscmail.ac.uk/policyandsecurity/
>

########################################################################

To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/WA-JISC.exe?SUBED1=FSL&A=1

This message was issued to members of www.jiscmail.ac.uk/FSL, a mailing list hosted by www.jiscmail.ac.uk, terms & conditions are available at https://www.jiscmail.ac.uk/policyandsecurity/