Pairwise Differences of Mean Outcomes Within Blocks
Description
Calculates the differences of mean outcomes for multiple specified treatment factors and specified pairs of comparison levels, within the specified blocks.
Usage
1  withinBlockEffects(y, w, calcOptions)

Arguments
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.

Details
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
.
Value
A vector of differences of mean outcomes within blocks.
Author(s)
Joseph J. Lee and Tirthankar Dasgupta
References
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.
See Also
diffMeansVector
Examples
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))))
