How to perform one-way anova with fixelcfestats?

Hi all,

I have done the whole-brain FBA, and I want to do statistics with fixelcfestats. I have 3 groups (patient1, patient2, healthy controls), and I want to compare the FBA metrics among three groups. I need to perform the one-way ANOVA and post-hoc, I’ve noticed the option -ftests and -fonly of fixelcfestats, but I don’t know how to use them. Here is my design and contrast matrix, do they look fine?

Design matrix: Each group has 2 subjects (HC, patient1, patient2, sex demeaned, Zage, Zlg(etiv))
1 0 0 -0.405 0.998 -0.038
1 0 0 -0.405 0.641 1.537
0 1 0 0.595 -0.522 -0.912
0 1 0 -0.405 -0.789 -0.393
0 0 1 0.595 -0.343 0.326
0 0 1 -0.405 -0.969 0.491

Contrast matrix:
1 -1 0 0 0 0
-1 1 0 0 0 0
0 1 -1 0 0 0
0 -1 1 0 0 0
1 0 -1 0 0 0
-1 0 1 0 0 0

I know my contrast matrix simply performs 6 t-tests, but I don’t know how to rewrite it to achieve one-way ANOVA and post-hoc. It would be very appreciated if you can give me some advice.

BW,
yuting

1 Like

I ran the following code but received a warning: F-test 1 is rank-deficient; row-space matrix decomposition will instead be used.

My code:

fixelcfestats log_fc_smooth/ files.txt design_matrix_F.txt contrast_matrix_F.txt matrix/ stats_log_fc_F/ -ftests ftest.txt -fonly

Design matrix: Each group has 2 subjects (HC, patient1, patient2, sex demeaned, Zage, Zlg(etiv))
1 0 0 -0.405 0.998 -0.038
1 0 0 -0.405 0.641 1.537
0 1 0 0.595 -0.522 -0.912
0 1 0 -0.405 -0.789 -0.393
0 0 1 0.595 -0.343 0.326
0 0 1 -0.405 -0.969 0.491

ftest.txt simply contains [1 1 1]

Contrast_matrix_F.txt:
1 -1 0 0 0 0
0 1 -1 0 0 0
1 0 -1 0 0 0

How can I fix this warning?

Thanks in advance.

Hi, all
After learning some knowledge about GLM, I rewrote my contrast matrix.

As I mentioned before, I have two cohorts (patients and healthy controls, in which the patient group includes two subgroups).

I ran a two-sample T-test at first (patients vs. HCs), to investigate the different fixels between these 2 groups.
Design matrix: HCs patients sex age TIV (sex, age, and TIV demeaned)
Contrast matrix: C1: 1 -1 0 0 0
C2: -1 1 0 0 0

Then I ran an F-test and one-way ANOVA, respectively. (My goal is to investigate the among-group differences, but I was not sure whether to do F-test or ANOVA?)

  1. For F-test:
    Design matrix: HCs subgroup1 subgroup2 sex age TIV (sex, age, and TIV demeaned)
    Contrast matrix: C1: 1 0 0 0 0 0
    C2: 0 1 0 0 0 0
    C2: 0 0 1 0 0 0
    F matrix: [1 1 1]

  2. For one-way ANOVA:
    Design matrix: HCs subgroup1 subgroup2 sex age TIV (sex, age, and TIV demeaned)
    Contrast matrix: C1: 1 -1 0 0 0 0
    C2: 0 1 -1 0 0 0
    F matrix: [1 1]

After that, I view the significant fixels in mrview. To my surprise, the significant fixels of the two-sample T-test are almost the same as those of the one-way ANOVA, why?

My goal is to investigate the among-group differences (among HCs, subgroup1, and subgroup2) and then extract the mean FBA metrics based on the significant fixel masks to do the post-hoc to investigate the between-group differences (HCs vs. subgroup1, HCs vs. subgroup2, and subgroup1 vs. subgroup2). To achieve my goal, which test should I do, an F-test or one-way ANOVA?

Best,
yuting