y11 <- c(18, 19, 20, 17, 20, 16)
y12 <- c(19, 16, 16, 14, 16, 18)
y21 <- c(19, 18, 19, 20, 17, 16)
y22 <- c(16, 10, 12, 9, 13, 15)
ci.2x2.mean.mixed(.05, y11, y12, y21, y22)
# Should return:
# Estimate SE t df p LL UL
# AB: -3.8333333 0.9803627 -3.910117 8.346534 0.0041247610 -6.0778198 -1.588847
# A: 2.0833333 0.4901814 4.250128 8.346534 0.0025414549 0.9610901 3.205577
# B: 3.7500000 1.0226599 3.666908 7.601289 0.0069250119 1.3700362 6.129964
# A at b1: 0.1666667 0.8333333 0.200000 5.000000 0.8493605140 -1.9754849 2.308818
# A at b2: 4.0000000 0.5163978 7.745967 5.000000 0.0005732451 2.6725572 5.327443
# B at a1: 1.8333333 0.9803627 1.870056 9.943850 0.0911668588 -0.3527241 4.019391
# B at a2: 5.6666667 1.2692955 4.464419 7.666363 0.0023323966 2.7173445 8.615989
Run the code above in your browser using DataLab