Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How do I correctly apply fitrm?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!