Great function. Thank you!
I changed the first line from
function[Levenetest] = Levenetest(X,alpha)
function[F, df1, df2, P] = Levenetest(X,alpha)
and suppressed all displays and prints (lines 87, 107:114, 144:153)
such that I can run multiple levene tests and save the results of each.
Thank you for your quick response.
Your roc function is indeed very good.
For those who would just want a quick measure of effect size, it's easy to perform the empirical AUC from Giuseppe Cardillo's function by adding:
STATS.auc = U / (L(1)*L(2));
More information see:
The results are exactly equal: ranksum gives a 2-tailed p-value and mwwtest gives a 1-tailed p-value. If you need a 2-tailed p-value simply multiply 1-tailed p-value by 2 (or, viceversa, divide 2-tailed p-value by 2 if you need 1-tailed p-value).
For Area Under The Curve, please, look at roc.m function that I wrote.
Thank you very much for this useful function.
Is it normal that the p-values it makes are different from those obtained with matlab's ranksum function:
[p h stats] = ranksum(1:100,11:110)
stats = mwwtest(1:100,11:110)
If so, which one shall we report?
As an addup, I think it would be great to add an output of the effect size using the area under the curve, as well as the confidence interval.