policyFX {clusteredinterference} | R Documentation |
Estimate Causal Effects of Population Treatment Policies Assuming Clustered Interference
Description
This function implements the estimators from Barkley et al. (2017) for estimating causal effects ("FX") of treatment policies from an observational study when clustered interference is assumed. Clustered interference is also often known as "partial" interference. For the manuscript introducing the methods in clusteredinterference, see: URL https://arxiv.org/abs/1711.04834
Usage
policyFX(data, formula, alphas, k_samps = NULL, ..., verbose = FALSE,
root_options = NULL, nAGQ = 2, return_matrices = FALSE)
Arguments
data |
A |
formula |
The |
alphas |
A numeric vector for the probabilities corresponding to the policies of interest. Each entry must be between 0 and 1. |
k_samps |
The maximum number of vectors to evaluate to estimate the
counterfactual probabilities (i.e., |
... |
The dots argument. The user may supply their own
|
verbose |
A Boolean on whether to print output to |
root_options |
These are passed to |
nAGQ |
This is the number of Adaptive Gaussian Quadrature points used in
the |
return_matrices |
A Boolean on whether to return the "bread" and "meat"
matrices in the sandwich variance. Defaults to |
Details
These estimators are based on inverse probability-weighting by the propensity score for treatment (IPW) to estimate causal effects of counterfactual policies of interest (i.e., "policy effects") when clustered interference is assumed. The policies of interest correspond to counterfactual scenarios in which treatment may be correlated within clusters.
This method estimates causal contrasts of these policies by estimating the counterfactual treatment probabilities; taking the correlation structures into account requires heavy computational resources, so the user should be patient.
The modeling formula for the propensity score (i.e., treatment) model is
specified via the formula
formal argument. An example of a model
logit-linear fixed effects would be Y | A ~ X1 + X2 + (1 |
cluster_ID) | cluster_ID
. A similar model that also includes an
interaction term is Y | A ~ X1 + X2 + X1:X2 + (1 | cluster_ID) |
cluster_ID
.
Value
A list
object including:
-
estimates
: A tidydata.frame
with columnsestimand
,estimate
,var
,se
,LCI
andUCI
for 95% CI's, and more information. -
parameters
: An untidylist
of the point estimates of all (target and nuisance) parameters. -
variance_matrices
: Whenreturn_matrices
isTRUE
this is alist
object for the "bread" and "meat" matrices in the sandwich variance calculations for each estimand. Otherwise, it is alist
object with length 0. -
propensity_scores
: The estimated propensity scores for each cluster. -
model
: The treatment model object. -
formula
: The full formula argument provided, after coercion to aFormula
object
Author(s)
Brian G. Barkley, BarkleyBG@unc.edu.
Some of the plumbing functions for estimating the sandwich variance matrix were adapted from Bradley Saul's geex package.
Some of the plumbing functions for the logistic mixed model likelihood were adapted from Bradley Saul's inferference package.
Brian G. Barkley
References
Barkley, B. G., Hudgens, M. G., Clemens, J. D., Ali, M., and Emch, M. E. (2017). Causal Inference from Observational Studies with Clustered Interference. arXiv preprint arXiv:1711.04834. (URL: https://arxiv.org/abs/1711.04834.)
Bradley C Saul and Michael G Hudgens (2017). A Recipe for
inferference
: Start with Causal Inference. Add Interference. Mix
Well with R. Journal of Statistical Software 82(2), pp.
1-21. doi: <10.18637/jss.v082.i02> (URL:
http://doi.org/10.18637/jss.v082.i02).
https://cran.r-project.org/package=inferference.
https://github.com/bsaul/inferference.
Bradley Saul (2017). geex
: An API for M-Estimation.
https://cran.r-project.org/package=geex.
https://github.com/bsaul/geex.
See Also
Please see the main package vignette at
vignette("estimate-policyFX")
. It describes the necessary arguments,
as well as some extra functionality.
Examples
## Not run:
toy_data <- clusteredinterference::toy_data
causal_fx <- policyFX(
data = toy_data,
formula = Outcome | Treatment ~ Age + Distance + (1 | Cluster_ID) | Cluster_ID,
alphas = c(.3, .5),
k_samps = 1,
verbose = FALSE
)
## End(Not run)