Calculates the differences of mean outcomes for multiple specified treatment factors and specified pairs of comparison levels, within the specified blocks.
1  withinBlockEffects(y, w, calcOptions)

y 
a vector or matrix of outcomes. 
w 
a vector or matrix of assignments. 
calcOptions 
a list of options for calculating the difference of mean outcomes within blocks.

calcOptions$block
should have the same length as y
and w
.
If unspecified, calcOptions$pairs
defaults to c(0,1)
.
If calcOptions$factors
is specified, its length must equal the number of rows specified in calcOptions$pairs
.
If unspecified, calcOptions$factors
defaults to an appropriatelysized vector of 1
's.
calcOptions$blockindex
should have the same length as calcOptions$factors
.
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 posttest 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))))

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.