| interference | R Documentation |
Estimate Causal Effects in presence of interference
interference(
formula,
propensity_integrand = "logit_integrand",
loglihood_integrand = propensity_integrand,
allocations,
data,
model_method = "glmer",
model_options = list(family = stats::binomial(link = "logit")),
causal_estimation_method = "ipw",
causal_estimation_options = list(variance_estimation = "robust"),
conf.level = 0.95,
rescale.factor = 1,
integrate_allocation = TRUE,
runSilent = TRUE,
...
)
formula |
The formula used to define the causal model. Has a minimum
of 4 parts, separated by |
propensity_integrand |
A function, which may be created by the user,
used to compute the IP weights. This defaults to
and |
loglihood_integrand |
A function, which may be created by the user, that
defines the log likelihood of the logit model used for |
allocations |
a vector of values in (0, 1). Increasing the number of elements of the allocation vector greatly increases computation time; however, a larger number of allocations will make plots look nicer. A minimum of two allocations is required. |
data |
the analysis data frame. This must include all the variables
defined in the |
model_method |
the method used to estimate or set the propensity model
parameters. Must be one of |
model_options |
a list of options passed to the function in
|
causal_estimation_method |
currently only supports |
causal_estimation_options |
A list. Current options are: (1) |
conf.level |
level for confidence intervals. Defaults to |
rescale.factor |
a scalar multiplication factor by which to rescale outcomes
and effects. Defaults to |
integrate_allocation |
Indicator of whether the integrand function uses the allocation parameter. Defaults to TRUE. |
runSilent |
if FALSE, status of computations are printed to console. Defaults to TRUE. |
... |
Used to pass additional arguments to internal functions such as
|
The following formula includes a random effect for the group: outcome |
exposure ~ propensity covariates + (1|group) | group. In this instance, the
group variable appears twice. If the study design includes a "participation"
variable, this is easily added to the formula: outcome | exposure |
participation ~ propensity covariates | group.
logit_integrand has two options that can be passed via the ...
argument:
randomization: a scalar. This is the r in the formula just
above. It defaults to 1 in the case that a participation vector is not
included. The vaccine study example demonstrates use of this argument.
integrate_allocation: TRUE/FALSE. When group sizes grow
large (over 1000), the product term of logit_integrand tends quickly to 0.
When set to TRUE, the IP weights tend less quickly to 0.
Defaults to FALSE.
If the true propensity model is known (e.g. in simulations) use
variance_estimatation = 'naive'; otherwise, use the default
variance_estimatation = 'robust'. Refer to the web appendix of
Heydrich-Perez et al. (2014) (\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1111/biom.12184")})
for complete details.
Returns a list of overall and group-level IPW point estimates, overall and group-level IPW point estimates (using the weight derivatives), derivatives of the loglihood, the computed weight matrix, the computed weight derivative array, and a summary.
Saul, B. and Hugdens, M. G. (2017). A Recipe for inferference: Start with Causal Inference. Add Interference. Mix Well with R. Journal of Statistical Software, 82(2), 1-21. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v082.i02")}
Perez-Heydrich, C., Hudgens, M. G., Halloran, M. E., Clemens, J. D., Ali, M., & Emch, M. E. (2014). Assessing effects of cholera vaccination in the presence of interference. Biometrics, 70(3), 731-741.
Tchetgen Tchetgen, E. J., & VanderWeele, T. J. (2012). On causal inference in the presence of interference. Statistical Methods in Medical Research, 21(1), 55-75.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.