Anova-N output question

8 Ansichten (letzte 30 Tage)
Nicholas Scott
Nicholas Scott am 6 Aug. 2024
Kommentiert: Divyam am 12 Aug. 2024
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

Akzeptierte Antwort

Divyam
Divyam am 8 Aug. 2024
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);
In the above results you can observe that the terms are full ranked and there are no non-full rank terms.
  4 Kommentare
Nicholas Scott
Nicholas Scott am 9 Aug. 2024
Thank you Divyam, I had actually started to ponder this question as to why the Line and pathology were tightly correlated and realized exactly where I went wrong with making this an anova3 way (at least with that categorization), so I change it to a different categorization to make more logical sense as to what might be helpful to deducing the behavior, trends, and interactions between variables. Thank you SO much!
Divyam
Divyam am 12 Aug. 2024
You are welcome @Nicholas Scott, all the best for your work!

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Produkte


Version

R2024a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by