x=c(29.33333,28.25,20.4, 28,33.5,18.166666667, 16.333333333,4.4,8.5, 13.6,12.83333333,14.2) n=c(6,4,5,5,4,6,3,5,4,5,6,5) S=factor(rep(c(1,2,3),4)) T=factor(c(rep(1,3),rep(2,3),rep(3,3),rep(4,3))) options(contrasts=c("contr.treatment","contr.poly")) L1=lm(x~S*T, x=T, weights=n) anova(L1) L2=lm(x~S+T, x=T, weights=n) summary(L2) anova(L2) V=vcov(L2) VT=V[4:6,4:6] VT/117.88*110.4564 b=L2$coef bt=b[4:6] t(bt)%*%solve(Vt)%*%bt*117.88