heatmap_ate: Visualize ATE Estimates by Heatmap

Description Usage Arguments Details Examples

Description

Visualize Average Treatment Effect (ATE) estimates for a grid of sensitivity parameters. "NS" is used to denote "not significant", meaning that the 95% posterior credible interval of the ATE contains 0.

Usage

1
2
heatmap_ate(x_trt, y_trt, x_ctrl, y_ctrl, 
            largest_effect, gamma_length = 11)

Arguments

x_trt

a tibble or data frame with observed pre-treatment variables for the treatment group

y_trt

a vector with outcomes for the treatment group

x_ctrl

a tibble or data frame with observed pre-treatment variables for the control group

y_ctrl

a vector with outcomes for the control group

largest_effect

the largest magnitude of sensitivity parameter to be considered, chosen from caliplot

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.

Details

The Average Treatment Effect is defined as:

τ^{ATE} := E[Y(1) - Y(0)] = E[Y(1)] - E(Y(0))

For each t, the complete-data distribution for each potential outcome can be written as a mixture of the distribution of observed and missing outcomes:

f(Y(t) \mid X) = f(T = t \mid X)f_t^{obs}(Y(t) \mid T = t, X) + f(T = 1-t \mid X)f_t^{mis}(Y(t) \mid T = 1 - t, X).

The logistic selection with mixtures of exponential families (logistic-mEF models) have been considered, the marginal selection functions in each arm are specified as logistic in the potential outcomes, and the observed data is modeled with a mixture of exponential family distributions, which can be identified using flexible nonparametric or machine learning method. Specifically, the treatment assignment model is posited as:

f(T=1 \mid Y(t),X) = \text{logit}^{-1}\{ α_t(X)+γ_t's_t(Y(t)) \},

where \text{logit}^{-1}(x) = (1 + exp(-x))^{-1}. This specification has sensitivity parameters γ = (γ_0, γ_1), which describe how treatment assignment depends marginally on each potential outcome, and a parmeter α_t(X) in each arm that is identified by the observed data once gamma_t is specified.
Under these settings, the missing outcome distribution can be infered as a tilt of the observed outcome distribution.

Examples

 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 Heatmap 
heatmap_ate(x_trt, y_trt, x_ctrl, y_ctrl, largest_effect = 0.05)
heatmap_ate(x_trt, y_trt, x_ctrl, y_ctrl, largest_effect = 0.05, joint = TRUE)

JiajingZ/TukeySens documentation built on Jan. 23, 2020, 3:44 a.m.