Hi Anderson,
I'm back for some follow-up questions.
I want to test for the main effects and interaction between my two within-subject factors: Factor A with 3 levels (C, V and M) and Factor B with 3 levels (scan number; S1, S2, S3).
I used the GLM matrix that you suggested and loaded the following contrasts (see attached).
I'm currently looking at tfce_corrp_fstat3.nii.gz to see which regions show an interaction between factors A and B.
Are the f-contrasts set up correctly to test what I want?
Thanks for the help.
Regards,
Florencia.




2018-03-25 23:14 GMT-03:00 Florencia Jacobacci <[log in to unmask]>:
Hi Anderson, thanks again for such a detailed answer. 
It is very much appreciated.
Best regards,
Florencia.

2018-03-25 21:34 GMT-03:00 Anderson M. Winkler <[log in to unmask]>:
Hi Florencia,

Please see below:


On 19 March 2018 at 09:56, Florencia Jacobacci <[log in to unmask]> wrote:
Hi Anderson, thank you so much for taking the time to answer my question.
I had mainly used the 2x2 within-subject ANOVA in this example to set up my matrix (https://pdfs.semanticscholar.org/a0a0/6723f4d1fb6ce2dcfeb574ce7ca70502ba3e.pdf).

Is this the right way to do it, then?

The examples shown in the book chapter depend on the software implementation being able to use the contrasts to figure out what is nuisance and what is not. Strictly, the models in the examples aren't really adequate in that they do not allow estimation of the parameters in an unambiguous way. In Matlab, for example, it's easy to show that mldivide (backslash division) yields different but just as valid solutions as the pinv (pseudoinverse). The best way to avoid these ambiguities is to make sure that the design is not rank deficient from the start.

The models in the chapter should work fine in SPM, though, and I believe the original (or some earlier version of the text) relates to ANOVAs in SPM, in which models as these are not a problem. Move to a different software and results may be different. The reader of a paper has no way of knowing so the best is really to spell out the full model, and make sure the coding leaves no linearly dependent columns.

 
(note: I hadn't included the exchangeability blocks in the matrix in the excel file but I was, indeed, using one per subject in the GLM design)
https://docs.google.com/spreadsheets/d/1zTJywYURacxD6q-23TeW56r4V2D52bk3uFDAzWCwgEg/edit?usp=sharing


Looks fine if you're following the previous email.

 
Sorry for my naivety, why is this design rank deficient? I thought each column would capture the mean for each subject. What would be the difference with the corrected matrix you suggest, besides having one less EV?

The original design has, say N columns, but these can be represented in a R^(N-1) space with no loss of information. There is an "extra" dimension there. A way of saying is that at least one of the EVs can be fully represented by a linear combination of all others. Here, the sum of all subject-specific EVs is the same as the sum of all other EVs.
 

The contrasts will remain the same since I haven't touched those EVs, right? (just removing the extra EV)

Correct.
 

My 3 scans per condition: S1, S2, S3 are set at 0, 30 min and 24 hs. I guess the most ideal would be to assume a first-order autoregressive covariance matrix. Is this a possibility? In case it's not, am I still safe assuming compound symmetry?

It's hard to tell really. Do you expect that dependences between 0-30 min are the same as 0-24h? For structural scans this is likely ok, maybe less so for functional scans. I can't tell which way to take because I don't know either. But you can resort to sign-flipping as long as the distribution of the residuals at the group level is symmetric (for fMRI his is usually the case).
 

Does PALM's corrcon use Bonferroni to correct for the multiple contrasts?

PALM uses synchronized permutations across contrasts to allow for the correction, such that non-independence between contrasts is taken into account. In randomise one would use Bonferroni. If contrasts are independent, then -corrcon and Bonferroni lead to similar results.

All the best,

Anderson
 

Thanks again!
Regards,
Florencia.


2018-03-18 18:19 GMT-03:00 Anderson M. Winkler <[log in to unmask]>:
Hi Florencia,

This design is rank deficient I'm afraid. However, it can be fixed easily: for each of the subject specific EVs, instead of coding as 1 or 0, code as 1 and -1 for any two consecutive subjects. For N subjects, there should be N-1 such EVs. See for example how the subject-specific EVs were coded in this other post: https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=FSL;f0151f95.1710

The EVs the test the various experimental conditions can be kept fixed.

Note that in this design, only within-subject effects are allowed, which I believe is what you want. Use one exchangeability block per subject, such that permutations happen only within subject. This assumes compound symmetry, though, which may or may not be tenable in your data.

Regarding correction over contrasts, in PALM use -corrcon. There's no equivalent option in randomise and you'd need to use Bonferroni. If all contrasts are orthogonal, this should lead to equivalent results. There's no need for and F-test.

All the best,

Anderson


On 13 March 2018 at 09:57, Florencia Jacobacci <[log in to unmask]> wrote:
Dear FSLers,

I am working with a longitudinal set of DWI images which has a complete within-subjects design.
For each subject I have 3 conditions (C, V and M) and 3 scans per condition: S1, S2, S3.

After adapting some of the examples shown on the webpage and going through this mailing list I've managed to set up my GLM matrix and my contrasts for a 2 way repeated measures ANOVA with 3 levels for each within-subject factor.

I'm interested in contrasting changes across sessions for each condition (VS1-VS2, VS1-VS3, VS2-VS3, etc) but also on the interaction. Particularly, I want to see if the difference S1-S2, S2-S3 and S1-S3 changes across conditions. C is my control so I've set up interaction contrasts comparing these differences in M and V to C.
I have an a priori hypothesis on the direction of the changes I'm looking for but I still would like to explore changes in both directions. That is to say I'm interested  in both S1-S2 and S2-S1, S3-S1 and S1-S3, etc. so I've set up contrasts in all directions.
The same with the interaction contrasts: I'd like to have info on CS1-CS2=VS1-S2 and CS2-CS1=VS2-VS1, etc.

I have some doubts on the F-tests that I designed to test for main effects of condition, sessions and interactions. Also, I'm not sure if I should use alphaa/2 for significance in the f-tests, since it is two-tailed.

I am using randomise. Another doubt that I have is about correction for multiple contrasts. I should divide my alpha by the number of contrasts to get the corrected alpha value, right?
Or would it be best to try PALM and use the option it has to correct for multiple contrasts?

Here are the links to the matrices that I have set up so far. Any comments and corrections will be greatly appreciated.

I hope someone with more experience on this subject can help me clarify these doubts.
Thanks in advance,
Florencia

--
Ing. Florencia Jacobacci.
PhD student

Instituto de Fisiología y Biofísica (IFIBIO) - Bernardo Houssay
Laboratorio de Fisiología de la Acción, Facultad de Medicina
Universidad de Buenos Aires




--
Ing. Florencia Jacobacci.

Instituto de Fisiología y Biofísica (IFIBIO) - Bernardo Houssay
Laboratorio de Fisiología de la Acción, Facultad de Medicina
Universidad de Buenos Aires
Paraguay 2155, C.A.B.A.(C1121ABG), Argentina
☎ 5950 9500 int 2132




--
Ing. Florencia Jacobacci.

Instituto de Fisiología y Biofísica (IFIBIO) - Bernardo Houssay
Laboratorio de Fisiología de la Acción, Facultad de Medicina
Universidad de Buenos Aires
Paraguay 2155, C.A.B.A.(C1121ABG), Argentina
☎ 5950 9500 int 2132



--
Ing. Florencia Jacobacci.
PhD student / Becaria doctoral
Instituto de Fisiología y Biofísica (IFIBIO) - Bernardo Houssay
Laboratorio de Fisiología de la Acción, Facultad de Medicina
Universidad de Buenos Aires
Paraguay 2155, C.A.B.A.(C1121ABG), Argentina
☎ 5950 9500 int 2132