Why Matlab give me the error that "the between-subjects design must have full column rank"?
8 ビュー (過去 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 で Startup and Shutdown についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!