anova1 within groups degree of freedom ?
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Wayne King
le 24 Mai 2012
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)
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur ANOVA dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!