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