Run sensitivity analysis on post-measurement design
post_sens(
formula,
data,
moderator,
g_by,
g_max = 1,
q_by,
sims = 1000,
conf_level = 0.95,
moderator_mono = NULL,
stable_mod = FALSE,
progress = TRUE,
solver = "Rglpk"
)
A list object containing sensitivity output.
A formula with syntax y ~ t
, where y
is the
(unquoted) name of the outcome and t
is the (unquoted) name of the treatment.
A data.frame containing variables in the formula, moderator, and covariates arguments.
A one-sided formuala with syntax ~ d
, where d
is the (unquoted) name of the moderator variable for the CATE.
Numeric indicating the grid spacing for the \(\gamma\) parameter that places an upper bound on the proportion of units whose moderator is affected by treatment.
Numeric indicating the maximum value of the \(\gamma\) parameter.
Numeric indicating the grid spacing for the mean of the moderator under a pre-test measurement.
An integer indicating the number of simulations for the bootstrap confidence intervals for the bounds.
A numeric indicating the confidence level for the bootstrap confidence intervals.
A integer or vector of length 2 indicating
if the bounds should assume monotonicity of the effect of the
post-test on the moderator with 1
indicating that the post-test
effect is positive and -1
indicating that it is negative. The
vector of length 2 allows the monotonicity assumption to vary by
treatment status with the first entry being for control and the
second for treated.
A logical value indicating if the bounds should assume that the moderator is unaffected by pre-vs-post measurement under the control condition.
A logical indicating if progress bars should be displayed. Defaults to TRUE.
A character indicating what linear programming solver to use: "Rglpk" (the default) or "lpSolve".
data(delponte)
post_sens(formula = angry_bin ~ t_commonality,
data = delponte,
moderator = ~ itaid_bin,
g_by = 0.1,
sims = 50
)
Run the code above in your browser using DataLab