anova1 within groups degree of freedom ?
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi,
I am doing an ANOVA with anova1 : anova1(D,X) X is such that there are only two groups, but the number of observations is not the same for these two groups.
How do I know the "within groups" degree of freedom ? I don't know where to read it from the output ... :-(
thank you !
댓글 수: 0
채택된 답변
Wayne King
2012년 5월 24일
strength = [82 86 79 83 84 85 86 87 74 82 78 75 76 77 79 79 77 78 82 79];
alloy = {'st','st','st','st','st','st','st','st','al1','al1','al1','al1','al1','al1', 'al2','al2','al2','al2','al2','al2'};
p = anova1(strength,alloy)
If N is the total number of observations and k is the number of groups, then N-k is the within groups DOF, k-1 is the between, and N-1 is the total. N-1 = (N-k) + (k-1). On the anova1 table these are:
k -1 (Groups)
N-k (Error)
N-1 (Total)
withingroup = length(strength) - length(unique(alloy))
betweengroup = length(unique(alloy))-1
totaldof = length(strength)-1
In the above, you can see that the F statistic value should be:
Fval = (184.8/2)/(102/17)
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 ANOVA에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!