# Help with anova design

4 Ansichten (letzte 30 Tage)
Manash Sahoo am 11 Okt. 2021
Beantwortet: Shivansh am 5 Apr. 2024
Hi there.
I have data formatted as such:
ID ClipNumber ROI1 ROI2 ROI3 ROI4 Dx
-------------------------------------------------------------------------------
1 1 .1 .3 .5 .1 1
1 2 etc. - - - 1
1 3 - - - - 1
1 4 - - - - 1
1 5 - - - - 1
2 1 - - - - 0
Where Dx is the between-subjects factor, and ClipNumber is a within-subjects factor, and ROIs repeated measures.
Reading over the doc I am a bit confused on how to set up a repeated measures anova with my data. Is there anyone that can lead me to the right path?
Mainly, my confusion lays in creating the "WithinDesign" table, and the "modelspec" input arg.
Any help would be great,
Thanks!
##### 1 Kommentar-1 ältere Kommentare anzeigen-1 ältere Kommentare ausblenden
Scott MacKenzie am 15 Okt. 2021
Bearbeitet: Scott MacKenzie am 15 Okt. 2021
It might help if you post the full dataset.

Melden Sie sich an, um zu kommentieren.

### Antworten (1)

Shivansh am 5 Apr. 2024
Hi Manash!
It looks like you want to do ANOVA analysis for your data. You can refer to the below steps and modify them according to your needs.
• Prepare Data: Ensure your data is in a MATLAB table with appropriate columns for IDs, ClipNumber, ROIs, and Dx. You should also handle the missing values.
• Create WithinDesign Table:
WithinDesign = table([1;2;3;4;5],'VariableNames',{'ClipNumber'});
• Specify Model:
modelspec = 'ROI1-ROI4 ~ Dx';
• Fit Model:
rm = fitrm(yourDataTable,'ROI1-ROI4 ~ Dx','WithinDesign',WithinDesign);
• Run ANOVA:
ranovaResults = ranova(rm);
This setup allows you to analyze the effect of "Dx" on "ROIs" across different "ClipNumbers".
I hope it helps!
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Repeated Measures and MANOVA finden Sie in Help Center und File Exchange

R2021b

### Community Treasure Hunt

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

Start Hunting!

Translated by