ovb_contour_plot.Rd
Contour plots of omitted variable bias for sensitivity analysis. The main input is a dml
model.
The vertical axis shows the partial R2 of the omitted variables with the outcome, i.e, the maximum proportion of the residual variation of the outcome that could be explained by latent variables.
The horizontal axis shows the proportion of variation in the long Riesz Representer which is not explained by the short Riesz Representer (RR). This indicates how much variation in the RR is created by latent variables. In the partial linear model, this quantity paralels the sensitivity parameter for the outcome, and simply equals the partial R2 of latent variables with the treatment, i.e, the maximum proportion of the residual variation of the treatment that could be explained by latent variables. In the non-parametric model with a binary treatment, the interpretation is analagous, but instead of gains in variance, it stands for the gains in precision (1/variance).
The contour levels represent the lower (upper) limit of the confidence bound for the target of interest, considering omitted variables with the postulated strength.
The dotted red line shows the chosen critical threshold (for instance, zero).
Almost all parameters can be customized by the user.
ovb_contour_plot(model, ...)
# S3 method for dml
ovb_contour_plot(
model,
parameter = c("ate", "att", "atu"),
which.bound = c("lwr", "upr"),
level = 0.95,
combine.method = "median",
rho2 = 1,
cf.y = NULL,
cf.d = cf.y,
bound.label = "Scenario",
group = FALSE,
group.number = 1,
threshold = 0,
lim.x = 0.15,
lim.y = lim.x,
asp = lim.x/lim.y,
nlevels = 10,
grid.number = 70,
col.contour = "grey40",
col.thr.line = "red",
xlab = NULL,
ylab = NULL,
cex.lab = 0.8,
cex.axis = 0.8,
cex.main = 1,
show.unadjusted = TRUE,
label.unadjusted = "Unadjusted",
label.text = TRUE,
round = 0,
cex.label.text = 0.7,
label.bump.x = NULL,
label.bump.y = NULL,
list.par = NULL
)
an object of class dml
.
arguments passed to other methods.
show contours for the lower limit (lwr
) or upper limit (upr
) of confidence bounds?
confidence level. Default is 0.95
.
method to combine the results of each repetition of the DML fit. Options are mean
and median
. Default is median
.
degree of adversity. Default is rho=1
, which assumes the maximum degree of adversity of confounding.
(nonparametric) partial R2 of the omitted variables with the outcome. Must be a number between (0, 1).
how much variation latent variables create in the Riesz Representer of the target parameters. Must be a number between (0, 1). When the target of interest is the ATE in a partially linear model, this corresponds to the partial R2 of omitted variables with the treatment. When the target of interest is the ATE in a non-parametric model with a binary treatment, this corresponds to the gains in precision (i.e, 1/variance) when predicting who is assigned to treatment.
text label for the manual bound provided via cf.y
and cf.d
.
contour plots for main analysis or group analysis? Default is FALSE
(main analysis).
if group = TRUE
, provide the number (level) of the group.
critical threshold of interest. Default is 0
.
sets limit for x-axis. If `NULL`, limits are computed automatically.
sets limit for y-axis. If `NULL`, limits are computed automatically.
the y/x aspect ratio. Default is 1.
number of levels for the contour plot.
approximate number of grid points on each axis.
color of contour lines.
color of threshold contour line.
label of x axis. If `NULL`, default label is used.
label of y axis. If `NULL`, default label is used.
The magnification to be used for x and y labels relative to the current setting of cex.
The magnification to be used for axis annotation relative to the current setting of cex.
The magnification to be used for main titles relative to the current setting of cex.
should the unadjusted estimates be shown? Default is `TRUE`.
label for the unadjusted estimate. Default is "Unadjusted"
.
should label texts be plotted? Default is TRUE
.
number of digits to show in contours and bound values
The magnification to be used for label text relative to the current setting of cex.
bump on the x coordinate of label text.
bump on the y coordinate of label text.
arguments to be passed to par
. It needs to be a named list.