Description Usage Arguments Details Examples
Visualize the same level of Average Treatment Effect (ATE) for different choices of sensitivity parameters with contour lines.
1 2 | contour_ate(x_trt, y_trt, x_ctrl, y_ctrl,
largest_effect, gamma_length = 11, ...)
|
x_trt |
a |
y_trt |
a vector with outcomes for the treatment group |
x_ctrl |
a |
y_ctrl |
a vector with outcomes for the control group |
largest_effect |
the largest magnitude of sensitivity parameter to be considered, chosen from |
gamma_length |
chosen length of sensitivity parameter sequence, which needs to be an odd integer |
joint |
logical. If TURE, the mean surface and residual variance will be estimated jointly for both treatment groups; if FALSE (default), the mean surface and residual variance will be estimated independently for each treatment group. |
... |
arguments passed to the function |
For analysis details, please see heatmap_ate
1 2 3 4 5 6 7 8 9 10 11 12 13 | # Observed data in treatment group
NHANES_trt <- NHANES %>% dplyr::filter(trt_dbp == 1)
x_trt <- NHANES_trt %>% select(-one_of("trt_dbp", "ave_dbp"))
y_trt <- NHANES_trt %>% select(ave_dbp)
# Observed data in control group
NHANES_ctrl <- NHANES %>% dplyr::filter(trt_dbp == 0)
x_ctrl <- NHANES_ctrl %>% select(-one_of("trt_dbp", "ave_dbp"))
y_ctrl <- NHANES_ctrl %>% select(ave_dbp)
# ATE Contour Plot
contour_ate(x_trt, y_trt, x_ctrl, y_ctrl, largest_effect = 0.05)
contour_ate(x_trt, y_trt, x_ctrl, y_ctrl, largest_effect = 0.05, joint = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.