caliplot: Calibrate sensitivity parameters based on pre-treatment...

Description Usage Arguments Details Examples

View source: R/caliplot.R

Description

Calibrate the magnitude of sensitivity parameters to the amount of variation in the treatment assignment T that is explained by outcome Y(t), above and beyond what is accounted for by observed pre-treatment variables X.

Usage

1
caliplot(x, trt, y, gamma_seq)

Arguments

x

a tibble or data frame with observed pre-treatment variables

trt

a vector with binary treatment indicators

y

a vector with outcomes

gamma_seq

a vector with chosen values for sensitivity parameter γ_t

Details

caliplot returns a plot of sensitivity parameter γ_t vs partial coefficient of variation from outcome Y, ρ^2_{Y|X}. For comparison, the largest four partial coefficients of variation from covariates are also plotted if the number of observed covariates is larger or equal to four; otherwise, all the partial coefficients of variation from covariates are plotted.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Observed Pre-treatment Variables 
x = NHANES %>% select(-one_of("trt_dbp", "ave_dbp"))

# Treatment 
trt = NHANES %>% select(trt_dbp)

# Outcomes 
y = NHANES %>% select(ave_dbp)

# Sensitivity Parameter Sequence 
gamma = seq(0.01, 0.1, by = 0.001)

# plot 
caliplot(x, trt, y, gamma)

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