Manova(rm) results are different from SPSS

16 visualizzazioni (ultimi 30 giorni)
Andreas Baas
Andreas Baas il 29 Giu 2022
When I replicate in IBM SPSS Statistics the Matlab example given for the manova function in the Help Documentation, of analysing the "fisheriris" sample dataset, the results are different. Why?
The full test code is:
load fisheriris
t = table(species,meas(:,1),meas(:,2),meas(:,3),meas(:,4),...
'VariableNames',{'species','meas1','meas2','meas3','meas4'});
Meas = table([1 2 3 4]','VariableNames',{'Measurements'});
rm = fitrm(t,'meas1-meas4~species','WithinDesign',Meas);
manova(rm)
The key output from the Matlab (R2021b) test is this table:
ans =
8×9 table
Within Between Statistic Value F RSquare df1 df2 pValue
________ ___________ _________ _________ ______ _______ ___ ___ ___________
Constant (Intercept) Pillai 0.99013 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Wilks 0.0098724 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Hotelling 100.29 4847.5 0.99013 3 145 3.7881e-145
Constant (Intercept) Roy 100.29 4847.5 0.99013 3 145 3.7881e-145
Constant species Pillai 0.96909 45.749 0.48455 6 292 2.4729e-39
Constant species Wilks 0.041153 189.92 0.79714 6 290 2.3958e-97
Constant species Hotelling 23.051 555.17 0.92016 6 288 4.6662e-155
Constant species Roy 23.04 1121.3 0.9584 3 146 1.4771e-100
Whereas the Multivariate test in IBM SPSS Statistics (version 27) returns the following output:
All the test-statistics and F-values are different, although they follow similar relative magnitudes and are in the same ballpark. I'm fairly sure that I'm replicating the same test in SPSS. The differences in results for this example are relatively benign, although I don't understand why the degrees-of-freedom are slightly different between the two as well (does this indicate I'm not actually replicating correctly?).
When I compare results on my own data, however, the differences are catastrophic, with SPSS happily rejecting, while Matlab says p>>0.05.
I trust SPSS more in this matter, BUT I need to run more than a million tests on matrix data, so I'd prefer to get it right in Matlab.

Risposte (0)

Prodotti


Release

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by