Calculates the differences of mean outcomes for multiple specified treatment factors and specified pairs of comparison levels, within the specified blocks.
withinBlockEffects(y, w, calcOptions)
a vector or matrix of outcomes.
a vector or matrix of assignments.
a list of options for calculating the difference of mean outcomes within blocks.
calcOptions$block should have the same length as
calcOptions$pairs defaults to
calcOptions$factors is specified, its length must equal the number of rows specified in
calcOptions$factors defaults to an appropriately-sized vector of
calcOptions$blockindex should have the same length as
A vector of differences of mean outcomes within blocks.
Joseph J. Lee and Tirthankar Dasgupta
Moore, David S., and George P. McCabe (1989). Introduction to the Practice of Statistics. Original source: study conducted by Jim Baumann and Leah Jones of the Purdue University Education Department.
1 2 3 4 5 6 7 8
## Reading comprehension pre- and post-test example data(reading) withinBlockEffects(y = reading$Diff1, w = reading$Group, calcOptions = list(block = reading$Block, pairs=rbind(rbind(c("Basal","DRTA"),c("Basal","Strat"), c("DRTA","Strat")), rbind(c("Basal","DRTA"), c("Basal","Strat"),c("DRTA","Strat"))), blockindex=c(rep(1,3),rep(2,3))))