MATLAB Answers

Why is ANOVAN so slow with multiple factors?

3 views (last 30 days)
Max on 23 Apr 2013
Hi everybody!
I'm using ANOVAN to run a 4-factorial ANOVA for repeated measurements. I've got 23 subjects and a 2x2x3x2 design. I know that in order to make it a proper within-subjects analysis I have to include SUBJECT as a fifth factor.
y = rand(552,1);
design{1} = repmat([1:23]',24,1);
design{2} = repmat([ones(23,1);2*ones(23,1)],12,1);
design{3} = repmat([ones(46,1);2*ones(46,1)],6,1);
design{4} = repmat([ones(92,1);2*ones(92,1);3*ones(92,1)],2,1);
design{5} = [ones(276,1);2*ones(276,1)];
My question is: Why does this simple analysis take about 4 Minutes (on a recent iMac), when statistics software packages like R or SPSS need about a second for the same analysis? Is there a way to make it faster? (Actually, if there is a positive answer to the second question, I no longer care about the first ;-)

Answers (0)

Community Treasure Hunt

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

Start Hunting!