
Bounds on a Treatment-by-Moderator Interaction Under Priming or Post-Treatment Bias
Source:R/third_variable_roles.R
role_bounds.RdA thin wrapper around the prepost package, which implements the nonparametric bounds of Blackwell, Brown, Hill, Imai, and Yamamoto (2025) for the interaction between a randomized treatment and a binary moderator when the moderator is measured after treatment (post-treatment bias) or before it (priming bias). The outcome must be binary.
Usage
role_bounds(
data,
treat,
outcome,
moderator,
design = c("post", "pre"),
sensitivity = FALSE,
...
)Arguments
- data
A data frame.
- treat, outcome, moderator
Character names of the binary treatment, binary outcome, and binary moderator.
- design
"post"(moderator measured after treatment) or"pre"(measured before).- sensitivity
Logical. If
TRUE, return the sensitivity analysis over the share of affected respondents (gammafor post,thetafor pre) instead of the sharp bounds.- ...
Further arguments passed to the prepost function, for example
sims,g_by,g_max,t_by,moderator_mono, orstable_mod.
Value
The object returned by prepost::post_bounds,
prepost::pre_bounds, prepost::post_sens, or
prepost::pre_sens.