Finds exact confidence intervals for treatment effects on a binary outcome in a twostage randomized experiment with interference. See Section 4.2 of Rigdon and Hudgens (2014) for details.
1 
eff 
treatment effect of interest; either “DEa0”, “DEa1”, “IE”, “TE”, or “OE” 
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 
α_{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 α_{1} 
B2 
number of sharp nulls to test in the targeted sampling algorithm 
C2 
number of rerandomizations (experiments) to conduct in computing the null distribution of the estimator 
level 
significance level of hypothesis tests, i.e., method yields a 1level confidence interval 
See Section 4.2 of Rigdon and Hudgens (2014) for detailed description. Please plot the pvalues against the effect as a check of targeted sampling algorithm performance.
B1 
total number of hypotheses that could be tested 
C1 
total number of rerandomizations (experiments) that could be performed 
frac.NA 
fraction of hypothesized sharp nulls that are not tested 
prob1 
final value of targeting parameter q_{p_{l}} in finding lower confidence limit 
prob2 
final value of targeting parameter q_{p_{u}} in finding upper confidence limit 
effect 
vector of sharp null hypotheses 
p 
vector of pvalues corresponding to the sharp null hypotheses 
lower 
lower limit to confidence interval 
upper 
upper limit to confidence interval 
Joseph Rigdon jrigdon@bios.unc.edu
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 10 11  #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)
#Inference for overall effect
l1 = exactCI('OE',assign.ex,data.ex,rep(3,10),rep(6,10),100,100,0.05)
#Check algorithm using a plot
plot(l1$effect,l1$p)

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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.