post_sens {prepost} | R Documentation |
Run sensitivity analysis on post-measurement design
Description
Run sensitivity analysis on post-measurement design
Usage
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"
)
Arguments
formula |
A formula with syntax |
data |
A data.frame containing variables in the formula, moderator, and covariates arguments. |
moderator |
A one-sided formuala with syntax |
g_by |
Numeric indicating the grid spacing for the
|
g_max |
Numeric indicating the maximum value of the |
q_by |
Numeric indicating the grid spacing for the mean of the moderator under a pre-test measurement. |
sims |
An integer indicating the number of simulations for the bootstrap confidence intervals for the bounds. |
conf_level |
A numeric indicating the confidence level for the bootstrap confidence intervals. |
moderator_mono |
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 |
stable_mod |
A logical value indicating if the bounds should assume that the moderator is unaffected by pre-vs-post measurement under the control condition. |
progress |
A logical indicating if progress bars should be displayed. Defaults to TRUE. |
solver |
A character indicating what linear programming solver to use: "Rglpk" (the default) or "lpSolve". |
Value
A list object containing sensitivity output.
Examples
data(delponte)
post_sens(formula = angry_bin ~ t_commonality,
data = delponte,
moderator = ~ itaid_bin,
g_by = 0.1,
sims = 50
)