N-way ANOVA different results with different command strings in MATLAB 2020b and 2023b
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
In MATLAB 2020b 5 way ANOVAN gives the following results
ie P=anovan(SBPerror,{SBPK PP MP IABP_dP CP_PeakSlopeOW},'continuous',[1 2 3 4 5],'varnames',strvcat('SBPK','PP','MP','IABP_dP','CP_PeakSlopeOW'))
And the results are;
Source Sum Sq. d.f. Mean Sq. F Prob>F
- --------------------------------------------------------------
- SBPK 2126.43 1 2126.43 804.69 0
- PP 1547.49 1 1547.49 585.6 0
- MP 501.47 1 501.47 189.77 0
- IABP_dP 9.16 1 9.16 3.47 0.0712
- CP_PeakSlopeOW 52.36 1 52.36 19.82 0.0001
- Error 89.85 34 2.64
- Total 4809.89 39
Identical command now run on MATLAB 2023a
Source Sum Sq. d.f. Mean Sq. F Prob>F
--------------------------------------------------------------
SBPK 2518.32 1 2518.32 950.18 0
PP 1982.98 1 1982.98 748.19 0
MP 622.39 1 622.39 234.83 0
IABP_dP 8.9 1 8.9 3.36 0.0757
CP_PeakSlopeOW 53.03 1 53.03 20.01 0.0001
Error 90.11 34 2.65
Total 4809.89 39
There are small but noteable differences between the two results. The data is identical in both cases.Hence there seems to be a difference between 2020b and 2023a. Is there an explanation? Improved mathematical accuracy?......
0 Kommentare
Antworten (1)
Shivansh
am 1 Sep. 2023
Hi Branko,
The differences in the results shared by you, specifically in the Sum of squares regression are significant. I am assuming that you might be using some kind of distribution with fixed parameters but varied samples for the two cases. It can be the reason of different sum of squares value but not very significant impact in the results.
I have tried to reproduce the difference at my end, but I am getting exact results for both the releases. I am attaching the results for reference.
SBPerror = [1.2, 0.8, 1.5, 1.0, 1.3, 0.9, 1.1, 1.4, 1.6, 1.2];
SBPK = [1, 2, 3, 1, 2, 3, 1, 2, 3, 1];
PP = [1, 1, 1, 2, 2, 2, 3, 3, 3, 3];
MP = [1, 2, 2, 1, 1, 2, 2, 1, 2, 2];
IABP_dP = [1, 2, 1, 2, 1, 2, 1, 2, 1, 2];
CP_PeakSlopeOW = [1, 1, 2, 2, 1, 1, 2, 2, 1, 1];
% Perform 5-way ANOVA
P = anovan(SBPerror, {SBPK, PP, MP, IABP_dP, CP_PeakSlopeOW}, 'continuous', [1 2 3 4 5], 'varnames', strvcat('SBPK', 'PP', 'MP', 'IABP_dP', 'CP_PeakSlopeOW'));
The results for R2020b
The results for R2023b
Both the results are exactly same.
If you think your data is an exception and the behaviour is for exactly same dataset, please share the exact dataset.
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!