Computes and summarizes the Lee bounds on the average direct effect for always-takers (ATs) for whom there is a direct effect of treatment (D) on the outcome (Y). This function utilizes compute_bounds_ats to calculate initial bounds and applies bootstrapping to estimate the standard deviation of these estimates, providing a summary in a data frame format.

lee_bounds(
  df,
  d,
  m,
  y,
  cluster = NULL,
  c_at_ratio = NULL,
  units = "",
  numdraws = 1000
)

Arguments

df

A data frame containing the data.

d

Name of the treatment variable in df.

m

Name of the mediator variable in df.

y

Name of the outcome variable in df.

cluster

(Optional) The name of the cluster variable for clustered bootstrapping.

c_at_ratio

(Optional) Specifies the ratio of EY(1,1) | C/EY(1,1) | AT. If this is specified, the direct effect for ATs is point-identified.

units

A string denoting the units of the outcome variable (for labeling purposes).

numdraws

The number of bootstrap draws for estimating the standard deviation.

Value

A data frame summarizing the computed bounds with terms, estimates, and standard errors.

Examples

if (FALSE) {
data(example_data)
summarized_bounds <- lee_bounds(df = example_data, d = "treatment", m = "mediator", y = "outcome")
}