lee_bounds.Rd
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
)
A data frame containing the data.
Name of the treatment variable in df
.
Name of the mediator variable in df
.
Name of the outcome variable in df
.
(Optional) The name of the cluster variable for clustered bootstrapping.
(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.
A string denoting the units of the outcome variable (for labeling purposes).
The number of bootstrap draws for estimating the standard deviation.
A data frame summarizing the computed bounds with terms, estimates, and standard errors.
if (FALSE) {
data(example_data)
summarized_bounds <- lee_bounds(df = example_data, d = "treatment", m = "mediator", y = "outcome")
}