![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1749174/image.png)
Anova-N output question
52 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Nicholas Scott
am 6 Aug. 2024 um 18:46
Kommentiert: Divyam
am 12 Aug. 2024 um 3:59
Hello community!
The closest prompt I could find that is similar to this would be: https://www.mathworks.com/matlabcentral/answers/1876737-anova-n-outputs-as-not-full-rank-returns-nan-p-value?s_tid=sug_su , but the reason their's showed NaN was there was not enough values. For mine I have 5.4 thousand entries, so I'm not sure that is the problem.
To reduce clutter of the code, I am going to attach the .mat files and the one-line of code.
pTHalf = anovan(stats(:,1), {Patho CellLine MW},'model','interaction','varnames', ...
{'Pathology','Cell Line','Molecular Weights'});
I ensured the data is of the same types allowed within the format of the Anova-n overview page. The only thing that I could think of was that there are more than two groups within the Cell Line and Molecular Weights groupings, but the only one that worked was the molecular weights, so I also doubt that is the reason.
This is the output below. Why do I have missing sections associated with a 'not full rank'. I do not see anything on the anova-N page that discusses this.
Thanks community!
Nick
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1748129/image.png)
0 Kommentare
Akzeptierte Antwort
Divyam
am 8 Aug. 2024 um 7:02
Hi @Nicholas Scott, it appears that the terms 'Pathology' and 'Cell Line' are highly correlated. In such scenarios, removing one of them should not affect the model. The solve this problem, simply remove the term with lower contribution.
To figure out which terms are contributing more, change the 'sstype' of your 'anovan' function to '1'. This will calculate each term's contribution by adding that term to the terms already included before it. For more information about the 'sstype' refer to the following documentation link: https://www.mathworks.com/help/stats/anovan.html#:~:text=single%20%7C%20double-,sstype,-%E2%80%94%20Type%20of
% To determine the effect of adding Cell Line
pTHalf = anovan(stats(:,1), {Patho CellLine MW},'model','interaction','varnames', ...
{'Pathology','Cell Line','Molecular Weights'}, 'sstype',1);
% To determine the effect of adding Pathology
pTHalf = anovan(stats(:,1), {CellLine Patho MW},'model','interaction','varnames', ...
{'Cell Line','Pathology','Molecular Weights'}, 'sstype',1);
Upon running the above code, it is observed that the 'Pathology' term is not a full rank term, and its F value is far lower than the 'Cell Line' term. Hence removing the 'Pathology' term from the 'anovan' function should remove the issue.
pTHalf = anovan(stats(:,1), {CellLine MW},'model','interaction','varnames', ...
{'Cell Line','Molecular Weights'}, 'sstype',1);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1749174/image.png)
In the above results you can observe that the terms are full ranked and there are no non-full rank terms.
4 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu ANOVA finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!