How can I calculate the F and p Values for more than 2 numeric vectors with anovan?

1 次查看(过去 30 天)
How can I calculate the F and p Values for more than 2 numeric vectors with anovan? This is my code:
%load data
y = [52.7 57.5 45.9 44.5 53.0 57.0 45.9 44.0]';
g1 = [1 2 1 2 1 2 1 2];
g2=g1.*5;
g3=g1+7;
%create model
R={g1,g2,g3};
p = anovan(y,R);
But the table always gives this answer:
Source Sum Sq. d.f. Mean Sq. F Prob>F
-------------------------------------------------
# X1 0 0 0 0 NaN
# X2 0 0 0 0 NaN
# X3 0 0 0 0 NaN
Error 217.598 6 36.2663
Total 221.379 7
Earlier, I did it with anova1 for every y separately. Is there another possibility to combine this in one step than anovan?

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Analysis of Variance and Covariance 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by