Learn R Programming

prepost (version 0.3.0)

post_bounds: Run post-treatment bounds.

Description

Run post-treatment bounds.

Usage

post_bounds(
  formula,
  data,
  moderator,
  sims = 1000,
  conf_level = 0.95,
  moderator_mono = NULL,
  stable_mod = FALSE,
  nondiff = FALSE,
  progress = TRUE
)

Value

A list object containing bounds.

Arguments

formula

A formula with syntax y ~ t, where y is the (unquoted) name of the outcome and t is the (unquoted) name of the treatment.

data

A data.frame containing variables in the formula, moderator, and covariates arguments.

moderator

A one-sided formuala with syntax ~ d, where d is the (unquoted) name of the moderator variable for the CATE.

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 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.

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.

nondiff

A logical value indicating if the bounds should assume the treatment effect on the moderator is independent of the potential outcomes.

progress

A logical indicating if progress bars should be displayed. Defaults to TRUE.

Examples

Run this code
data(delponte)
post_bounds(
  formula = angry_bin ~ t_commonality,
   data = delponte,
  moderator = ~ itaid_bin,
 sims = 50
)

Run the code above in your browser using DataLab