How can I test interactions of between and within-subject variable in repeated measure anova

4 visualizaciones (últimos 30 días)
Hi!
I have a 66 x 16 table (attached). Rows represents subejcts. Column 1:4 represents between-subejct variable (Group (PTSD/HC), Age, TBI (yes/no) and Wholebrain_FA. Age, TBI and WHolebrain_FA represents covariates. Column 5:16 represents within-subject measure: 5:10 represents FA measure from 6 white matter brain tract in left brain hemisphere and 11:16 represents FA measure from the same 6 white matter brain tracts but in right hemisphere.
I want to model the data using a mixed ANOVA with 2 within-, 1 between-subject and 3 covariates variables. To test the effect of Group, the Group X Tract and Group X Tract X Hemisphere I model the data with fitrm and test it with ranova:
% set within-subject variables
w1 = table(categorical({'CB','SLF_I','SLF_II','SLF_III','UF','OF_ST','CB','SLF_I','SLF_II','SLF_III','UF','OF_ST'}'), 'VariableNames',{'tract'});
w2 = table(categorical({'left','left','left','left','left','left', 'right','right','right','right','right','right'}'), 'VariableNames',{'hemisphere'});
w3 = table(w1.tract .* w2.hemisphere, 'VariableNames',{'tract_hemisphere'});
w = [w1 w2 w3];
% Fit model
rm = fitrm(t,'CB_left_FA-OF_ST_right_FA~group+age+tbi+Wholebrain_FA','WithinDesign',w, 'WithinModel', 'separatemeans');
% Test for sphericity assumption
mauchly(rm);
% Test model with ANOVA
a=ranova(rm,'WithinModel','tract*hemisphere');
I now have 2 questions:
1) Is it possible to test the Group X Hemisphere interaction for each level of Tract (CB, OF-ST, SLF-1, SLF-2, SLF-3, UF) using the coefficients derived from the omnibus model? I have looked into the function coeftest but can´t seem to figure it out. Can anyone help?
2) Using
multcompare(rm,'group','By','tract_hemisphere','ComparisonType','Bonferroni'));
I can test each pair of the three-way interaction. However, since I group the tract_hemisphere variable by Group the multiple comparison correction does no work the way I intend it; It corrects for each pair of test (HC vs. PTSD) at each level of tract_hemisphere (i.e. two tests) and not the whole batch of tests. Is it possible to set up the model so it corrects for for each Group X Tract X Hemisphere pairwise comparison?

Respuestas (0)

Productos


Versión

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by