ANOVAN returning different F-score for the same headers?

1 view (last 30 days)
Hi guys, im a little confused here, and i cant figure out if im just rubbish at statistics or if ANOVAN is doing something a little strange.
im testing a couple of different things with anovan and noticed it. the example below is a simplified example that shows my confusion.
x = [repmat(1,[1,50]), repmat(2,[1,50])];
y = repmat([1,2,3,4,5,6,7,8,9,10], [1,10]);
z = repmat([1,2,3,4,5], [1,20]);
R = rand([1,100]);
res = (10*x) + R;
So res is clearly correlated with x and should have a high F-score. But surely if i run the following two tests then the F-score for x should be the same? they are not; the Mean Sq. are the same, but the F-scores are different. it was my understanding that the F-score for the two linear tests should be the same, as the linear score for x never relies on y or z?
[p t] = anovan(res,{x,y}, 'model', 'full', 'varnames', {'x', 'y'});
[pp tt] = anovan(res,{x,z}, 'model', 'full', 'varnames', {'x', 'z'});
for the first i get 32744, the second i get 33635?

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!