prepost_bounds {prepost} | R Documentation |
Run Prepost bounds
Description
Run Prepost bounds
Usage
prepost_bounds(
formula,
data,
moderator,
prepost,
sims = 1000,
conf_level = 0.95,
moderator_mono = NULL,
outcome_mono = NULL,
stable_mod = FALSE,
tau = 0.25,
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 |
prepost |
A one-sided formula with syntax ~ z, where z is the indicator variable for whether the moderator was measured pre- or post-treatment. |
sims |
An integer specifying the number of bootstrap replications for the confidence intervals. |
conf_level |
A numeric specifying level for the 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 |
outcome_mono |
A integer or vector of length 2 indicating if the bounds
should assume monotonicity of the effect of the post-test on the outcome
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. |
tau |
A numeric indicating how close the the moment conditions of the estimated bounds have to be from the minimum values in the sample. This allows us to obtain bounds and confidence intevals even when the assumptions are slightly violated due to sampling. |
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 bounds.
Examples
data(land_experiment)
prepost_bounds(
support ~ treat_comb,
data = land_experiment,
moderator = ~ land_insecure,
prepost = ~ prepost,
sims = 50
)