Description Usage Arguments Details Value References Examples
View source: R/estimates_hierarchical.R
Estimate average causal effects and their variance under twostage hierarchical treatment assignment, assuming partial and stratified interference.
1  estimates_hierarchical(estimator_data)

estimator_data 
data frame of

estimates
produces values of the estimators proposed by Hudgens and
Halloran (2008) of the population average direct causal effect under high
treatment saturation (psi), the population average direct causal effect under
low treatment saturation (phi), the population average indirect causal effect,
the population average total causal effect, and the population average overall
causal effect. It also produces values of the variance estimators which assume
stratified interference (i.e. potential outcomes of a unit are affected by its
own treatment assignment and only the treated proportion of its group; the
precise set of treated group members does not matter).
A list of 2 lists:
A list of 5 scalars corresponding to the values of the estimators of the average direct causal effect under high treatment saturation (psi), the average direct causal effect under low treatment saturation (phi), the average indirect causal effect, the average total causal effect, and the average overall causal effect.
A list of 5 scalars corresponding to the values of the variance of the estimator of the average direct causal effect under high treatment saturation (psi), the average direct causal effect under low treatment saturation (phi), the average indirect causal effect, the average total causal effect, and the average overall causal effect.
Hudgens, M.G. & Halloran M.E. (2008). Toward causal inference with interference. Journal of the American Statistical Association, 103(482), 832–842.
Aronow, P.M. et al. (2020). Spillover effects in experimental data. arXiv preprint, arXiv:2001.05444.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  # Simulate first and second stage treatment
# assignment and outcomes:
group < rep(1:6, each = 30/6)
c < 1/2
k < c(2/5, 3/5)
tr_assignment <
make_tr_vec_permutation_hierarchical(group, c, k, R = 1,
seed = 357)[[1]]
potential_outcomes < make_dilated_out_hh(N = 30,
seed = 357)
# Create data frame with group label, first and second stage
# treatment assignment and outcomes:
estimator_data < make_estimator_data(tr_assignment,
potential_outcomes)
# Estimate average causal effects and their variance:
estimates_hierarchical(estimator_data)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.