Why Matlab give me the error that "the between-subjects design must have full column rank"?
조회 수: 7 (최근 30일)
이전 댓글 표시
Hi everyone, here's the problem. I want to analize datas about glycemic values in 10 days for 4 conditions with the test "ranova". I have created a matrix "condition" [10x4], then a cell array [10x1] "timing" with moments of data collection, a table t=table(timing,condition(:,1),condition(:,2),condition(:,3),condition(:,4),'VariableNames',{'timing','all_1','all_2','all_3','ctrl'}), and then a table [4x1] Meas=([1 2 3 4]','VariableNames',{'Measurements'}). When I try to do the function rm=fitrm(t,'all_1-ctrl~timing','WithinDesign',Meas) Matlab gives me the error that the between-subjects design must have full column rank and I can't find the reason why is that. Can you help me please?
댓글 수: 1
Saurabh
2024년 12월 12일
Could you please format the code to make it easier to read and understand? Additionally, could you let me know which version of MATLAB you are using for this operation? Thank you!
답변 (1개)
Debadipto
2024년 12월 18일
The column rank error likely occurs because of the "timing" variable. This can happen if "timing" does not represent independent levels or lacks sufficient variability to maintain a full column rank. For example, if "timing" contains identical values (e.g., 'Day 1' for all rows), it eliminates any variability in the between-subjects factor, making 'timing" collinear and causing a rank deficiency. Ensure that "timing" accurately represents the moments of data collection, avoiding duplicate or constant values that could result in a singular matrix in the design.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!