Hi everyone,
I am doing some statistics functions in Matlab and checking them in SPSS. I am doing N-way ANOVA in Matlab, but it gives me wrong results comparing it to SPSS. As you can see later, the results completely differ, they are not even close. This is my code (I am showing you the brief version of the data to show what is going on):
connection= [0.3950; 0.3774; 0.0622; 0.0140; 0.1424; 0.1029; 0.1711; ... 0.1595; 0.0774; 0.0111];abstinence=[12;6;8;11;14;6;3;6;3;4];relapse=[0;1;2;0;1;1;3;0;1;0];[~,tbl]=anovan(connection,{abstinence, relapse},'display','on','model','full',... 'varnames',{'Abstinence','Relapse'}, 'continuous',[1,2]);
I am doing it to be full interaction and with continuous predictors, the same as in SPSS. And this gives me this results in Matlab:
Source Sum Sq. d.f. Mean Sq. F Prob>F---------------------------------------------------------------- Abstinence 0.02207 1 0.02207 0.93 0.3714 Relapse 0.01428 1 0.01428 0.6 0.4667 Abstinence*Relapse 0.01587 1 0.01587 0.67 0.4441 Error 0.14196 6 0.02366 Total 0.1653 9
And in SPSS (sorry it is in Spanish: Abstinencia is Abstinence and Recaidas is Relapse, just in case):
I don't know why this is happening or if I am doing something wrong. Besides, I have changed 'model' to 'interaction' and it does not work either. Please any help is welcomed!
Thanks in advanced.
Best Answer