Computes the estimators of Hudgens and Halloran (2008) and bounds of Rigdon and Hudgens (2014) for treatment effects on a binary outcome in a twostage randomized experiment with interference
1 
g 
1st stage of randomization vector where element i=1,…,k is equal to 1 if group i was randomized to strategy α_{1} and 0 if randomized to strategy α_{0} 
data 
2 \times 2\times k array of 2 \times 2 table data where row 1 is treatment=yes, row 2 is treatment=no, column 1 is outcome=yes, and column 2 is outcome=no 
m.a0 
α_{0} randomization vector where element i=1,…,k is equal to the number of subjects in group i who would receive treatment if group i was randomized to strategy α_{0} 
m.a1 
α_{1} randomization vector where element i=1,…,k is equal to the number of subjects in group i who would receive treatment if group i was randomized to strategy α_{1} 
Function will return many values (to be used by other functions in this package), but the only important value here is tab.eff
tab.eff 
Labeled table of estimates and bounds 
Joseph Rigdon jrigdon@bios.unc.edu
Hudgens, M.G. and Halloran, M.E. “Toward causal inference with interference.” Journal of the American Statistical Association 2008 103:832842.
Rigdon, J. and Hudgens, M.G. “Exact confidence intervals in the presence of interference.” Submitted to Statistics and Probability Letters 2014.
1 2 3 4 5 6 7 8 9  #Made up example with 10 groups of 10 where half are randomized to a0 and half to a1
#a0 is assign 3 of 10 to treatment and half to a1 is assign 6 of 10 to treatment
d = c(1,1,5,3,0,6,3,1,0,4,3,3,0,5,3,2,1,1,5,3,2,2,4,2,1,5,2,2,2,3,4,1,1,1,5,3,1,5,2,2)
data.ex = array(d,c(2,2,10))
assign.ex = c(1,0,0,0,1,1,0,1,1,0)
#Estimates and bounds
e = estbound(assign.ex,data.ex,rep(3,10),rep(6,10))
e$tab.eff

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.