interference(formula, propensity_integrand = "logit_integrand",
loglihood_integrand = propensity_integrand, allocations, data,
model_method = "glmer", model_options = list(family = binomial(link =
"logit")), causal_estimation_method = "ipw",
causal_estimation_options = list(set_NA_to_0 = TRUE, variance_estimation =
"robust"), conf.level = 0.95, rescale.factor = 1, ...)
|
and ~
in a specific structure:
outcome | exposure ~ propensity covariates | group
. The order matters,
and the pipes split the datlogit_integrand
,
which calculates the product of inverse logits for individuals in a group:
$\prod_{j = 1}^{n_i} {r \times h_{ij}(b_i)^{A_{ij}}}{1 robust
variance
estimation. Generally, this will be the same function as
propensity_integrand
. Indeed, this is the default.formula
.'glm'
, 'glmer'
, or 'oracle'
.
Defaults to 'glmer'
. For a fixed effects only model use 'glm'
,
and to include model_method
. Defaults to list(family = binomial(link = 'logit'))
.
When model_method = 'oracle'
, the list must have two elements
fixed.effects
and random
'ipw'
.variance_estimation
is
either 'simple'
or 'robust'
. See details. Defaults to 'robust'
. (2)
is set_NA_to_0
. Defaults to TRUE
. When, for example, group 0.95
.1
.numDeriv::grad()
or integrate()
. Additionally, arguments can be
passed to the propensity_integrand
and loglihood_integrand
functions.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 aparticipation
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 oflogit_integrand
tends quickly to 0.
When set toTRUE
, the IP weights tend less quickly to 0.
Defaults toFALSE
.If the true propensity model is known (e.g. in simulations) use
variance_estimatation = 'simple'
; otherwise, use the default
variance_estimatation = 'simple'
. Refer to the web appendix of