Description Usage Arguments Details Value Functions References Examples
Estimate exposurespecific causal effects and their variance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17  estimates(
obs_exposure,
obs_outcome,
obs_prob_exposure,
n_var_permutations = 10,
effect_estimators = c("hajek", "horvitzthompson"),
variance_estimators = c("hajek", "horvitzthompson"),
control_condition = NULL,
treated_conditions = NULL
)
estimators_full_neighborhood(
obs_exposure,
obs_outcome,
obs_prob_exposure,
n_var_permutations = 10
)

obs_exposure 
an 
obs_outcome 
a vector length 
obs_prob_exposure 
a list of 3 lists containing exposure probabilities:
Such list is returned by
function 
n_var_permutations 
if 
effect_estimators 
string vector with names of estimators to be estimated among 'hajek', 'horvitzthompson'. Default is both. 
variance_estimators 
string vector with names of variance estimators to be estimated among 'hajek', 'horvitzthompson', 'constant_effect', 'max_ht_const'. Default includes the first two. Estimating 'constant_effect' or 'max_ht_const' signficantly increases the running time. 
control_condition 
string specifying the name of the single condition to be
considered the pure control condition (present in

treated_conditions 
string vector specifying the names of the conditions
(present in 
estimates
produces values for the estimator of the average unitlevel
causal effect of exposure k versus l and its variance estimator for the
exposure mappings returned by function make_exposure_map_AS
,
using a HorvitzThompson and a Hajek estimator. It also computes
HorvitzThompson and Hajek estimators of the total of potential outcomes,
which are inputs in the computation of average unitlevel causal effect of
exposure k versus l.
A list of 13 lists:
yT_ht
:A named numeric vector which contains the values of the HorvitzThompson estimator of the total of potential outcomes under each exposure condition as derived in Equation 1 of Aronow and Samii (2017).
yT_h
:A named numeric vector which contains the values of the Hajek estimator of the total of potential outcomes under each exposure condition as derived in Equation 15 of Aronow and Samii (2017).
var_yT_ht
:A named numeric K * 1 matrix which contains the values of the variance estimator of the HorvitzThompson estimator of the total of potential outcomes under each exposure condition as derived in Equation 7 and Proposition 5.1 of Aronow and Samii (2017).
var_yT_h
:A named numeric K * 1 matrix which contains the values of the variance estimator of the Hajek estimator of the total of potential outcomes under each exposure condition as explained in the first paragraph of page 1929 of Aronow and Samii (2017).
cov_yT_ht
:A named numeric permutation(K,2) * 1 matrix which contains the values of the covariance estimator of the HorvitzThompson estimator of the total of potential outcomes across exposures conditions k and l as derived in Equation 10 of Aronow and Samii (2017). When the number of exposure conditions K = 4, then the number of rows of this matrix is 12; permutation(4,2).
cov_yT_h
:A named numeric permutation(K,2) * 1 matrix which contains the values of the covariance estimator of the Hajek estimator of the total of potential outcomes across exposures conditions k and l as explained in the first paragraph of page 1929 of Aronow and Samii (2017). When the number of exposure conditions K = 4, then the number of rows of this matrix is 12; permutation(4,2).
tau_ht
:A named numeric vector which contains the values of the HorvitzThompson estimator of the average unitlevel causal effect of exposure k versus exposure l as derived in Equation 3 of Aronow and Samii (2017). Here exposure l is fixed to the No Exposure condition (i.e. no direct or indirect exposure).
tau_h
:A named numeric vector which contains the values of the Hajek estimator of the average unitlevel causal effect of exposure k versus exposure l. Here exposure l is fixed to the No Exposure condition (i.e. no direct or indirect exposure).
tau_dsm
:A named numeric vector which contains the values of the difference in sample means estimator of the total observed outcomes across exposures k and l. Here exposure l is fixed to the No Exposure condition (i.e. no direct or indirect exposure).
var_tau_ht
:A named numeric vector which contains the values of the conservative variance estimator of the variance of the HorvitzThompson estimator of the average unitlevel causal effect of exposure k versus exposure l as derived in Equation 11 of Aronow and Samii (2017). Here exposure l is fixed to the No Exposure condition (i.e. no direct or indirect exposure).
var_tau_h
:A named numeric vector which contains the values of the linearized variance estimator of the variance of the Hajek estimator of the average unitlevel causal effect of exposure k versus exposure l as derived in Equation 11 of Aronow and Samii (2017) and further explained in the first paragraph of page 1929. Here exposure l is fixed to the No Exposure condition (i.e. no direct or indirect exposure).
var_tau_ht_const_eff
:A named numeric vector which contains the values of the constant effects variance estimator of the variance of the HorvitzThompson estimator of the average unitlevel causal effect of exposure k versus exposure l as derived in Equation 2.15 of Aronow (2013). Here exposure l is fixed to the No Exposure condition (i.e. no direct or indirect exposure).
var_tau_ht_max
:A named numeric vector which contains the maximum
between var_tau_h
and var_tau_ht_const_eff
.
estimators_full_neighborhood
: Produces values for the estimator of the average
unitlevel causal effect of exposure k versus l and its variance estimator
for the exposure mapping returned by function
make_exposure_map_full_neighborhood
, using a HorvitzThompson
and a Hajek estimator. It also computes HorvitzThompson and Hajek
estimators of the total of potential outcomes, which are inputs in the
computation of average unitlevel causal effect of exposure k versus l.
Aronow, P. M. (2013). Model assisted causal inference. PhD thesis, Department of Political Science, Yale University, New Haven, CT.
Aronow, P.M. & Samii, C. (2017). Estimating average causal effects under general interference, with application to a social network experiment. The Annals of Applied Statistics, 11(4), 1912–1947.
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 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68  # Create adjacency matrix and treatment assignment vector
# to produce observed exposure conditions:
adj_matrix < make_adj_matrix(N = 9, model = 'sq_lattice')
tr_vector < make_tr_vec_permutation(N = 9, p = 0.2,
R = 1, seed = 357)
obs_exposure < make_exposure_map_AS(adj_matrix, tr_vector,
hop = 1)
# Simulate a vector of outcome data:
potential_outcome < make_dilated_out(adj_matrix, make_corr_out,
seed = 357, hop = 1)
obs_outcome < rowSums(obs_exposure*t(potential_outcome))
# Create exposure probabilities:
potential_tr_vector < make_tr_vec_permutation(N = 9, p = 0.2,
R = 36,
seed = 357)
obs_prob_exposure < make_exposure_prob(potential_tr_vector,
adj_matrix,
make_exposure_map_AS,
list(hop=1))
# Estimate exposurespecific causal effects and their variance:
estimates(obs_exposure, obs_outcome, obs_prob_exposure,
n_var_permutations = 30,
control_condition = 'no')
# Create adjacency matrix and treatment vector to
# produce observed exposure conditions according to the
# "full neighborhood" exposure mapping:
adj_matrix < make_adj_matrix(N = 81, model = 'sq_lattice')
tr_vector < make_tr_vec_permutation(N = 81, p = 0.5,
R = 1, seed = 357)
obs_exposure_full_nei < make_exposure_map_full_neighborhood(adj_matrix,
tr_vector)
# Simulate a vector of outcome data:
potential_outcome_full_nei <
make_dilated_out_full_neighborhood(adj_matrix, make_corr_out,
seed = 357)
obs_outcome_full_nei <
rowSums(obs_exposure_full_nei*t(potential_outcome_full_nei))
# Create exposure probabilities:
potential_tr_vector < make_tr_vec_permutation(N = 81, p = 0.5,
R = 36,
seed = 357)
obs_prob_exposure_full_nei < make_exposure_prob(potential_tr_vector,
adj_matrix,
make_exposure_map_full_neighborhood)
# Estimate exposurespecific causal effects and their variance:
estimators_full_neighborhood(obs_exposure_full_nei, obs_outcome_full_nei,
obs_prob_exposure_full_nei,
n_var_permutations = 30)

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