3

Consider the one-way ANOVA with random effect.

library(AOV1R) # a package of mine
set.seed(666)
I=3; J=4 $ number of groups and number of replicates
dat <- simAV1R(I, J, mu=0, sigmab=2, sigmaw=3)
fit <- aov1r(y ~ group, data=dat)
ssb <- fit[["Sums of squares"]][["ssb"]]
ssw <- fit[["Sums of squares"]][["ssw"]]
total_variance <- sum(fit[["Variance components"]])

Now, compute the Satterthwaite degrees of freedom of the total variance by the ordinary method:

# Satterthwaite degrees of freedom of the total variance
a <- 1/J/(I-1)
b <- (1-1/J) * 1/I/(J-1)
(a*ssb+b*ssw)^2/((a*ssb)^2/(I-1) + (b*ssw)^2/(I*(J-1)))
# [1] 9.34502

Now, here is another way to get these degrees of freedom.

# other way to get the Satterthwaite df
library(VCA)
vca <- anovaMM(y ~ (group), Data=dat)
# estimated variance of total variance
var_total_var <- sum(vcovVC(vca))
# Satterthwaite df
2*total_variance^2 / var_total_var 
# [1] 9.34502

They are the same.

The advantage of the second method is that we don't need independent mean squares. But it requires an estimate of the variance of the total variance.

This equality is not new. But I don't find any name for the second method. Does it have a name? (like "generalized Satterthwaite", e.g.).

Nick Cox
  • 48,377
  • 8
  • 110
  • 156
Stéphane Laurent
  • 17,425
  • 5
  • 59
  • 101

0 Answers0