Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How do I correctly apply fitrm?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I have a data set with two conditions ("H" and "L") and 36 participants. Each participant was measured five times in phases called "pre", "balls", "between", "basket" and "post". This information is stored in the variable "comptable_both_conditions".
I am interested in running a RM ANOVA to see if there are within group differences between the phases.
Here is my code:
condition = ...
['H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' 'H' ...
'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' 'L' ]';
% assigning each participant to a condition
t = table(condition,comptable_both_conditions(:,1),...
comptable_both_conditions(:,2),comptable_both_conditions(:,3),...
comptable_both_conditions(:,4),comptable_both_conditions(:,5),...
'VariableNames',{'groups','pre','balls','btw','basket','post'});
% creating the table for the RM ANOVA
Meas = table([1 2 3 4 5]','VariableNames',{'Measurements'});
rm = fitrm(t,'pre-post ~ condition','WithinDesign',Meas);
I am unsure if this is correct. Also, when running the code I get an error which I cant seem to find online:
Undefined function 'fitrm' for input arguments of type 'table'.
Any help would be greatly appreciated!
Thanks!
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!