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
)

Arguments

model

an object of class dml.

...

arguments passed to other methods.

which.bound

show contours for the lower limit (lwr) or upper limit (upr) of confidence bounds?

level

confidence level. Default is 0.95.

combine.method

method to combine the results of each repetition of the DML fit. Options are mean and median. Default is median.

rho2

degree of adversity. Default is rho=1, which assumes the maximum degree of adversity of confounding.

cf.y

(nonparametric) partial R2 of the omitted variables with the outcome. Must be a number between (0, 1).

cf.d

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.

bound.label

text label for the manual bound provided via cf.y and cf.d.

group

contour plots for main analysis or group analysis? Default is FALSE (main analysis).

group.number

if group = TRUE, provide the number (level) of the group.

threshold

critical threshold of interest. Default is 0.

lim.x

sets limit for x-axis. If `NULL`, limits are computed automatically.

lim.y

sets limit for y-axis. If `NULL`, limits are computed automatically.

asp

the y/x aspect ratio. Default is 1.

nlevels

number of levels for the contour plot.

grid.number

approximate number of grid points on each axis.

col.contour

color of contour lines.

col.thr.line

color of threshold contour line.

xlab

label of x axis. If `NULL`, default label is used.

ylab

label of y axis. If `NULL`, default label is used.

cex.lab

The magnification to be used for x and y labels relative to the current setting of cex.

cex.axis

The magnification to be used for axis annotation relative to the current setting of cex.

cex.main

The magnification to be used for main titles relative to the current setting of cex.

show.unadjusted

should the unadjusted estimates be shown? Default is `TRUE`.

label.unadjusted

label for the unadjusted estimate. Default is "Unadjusted".

label.text

should label texts be plotted? Default is TRUE.

round

number of digits to show in contours and bound values

cex.label.text

The magnification to be used for label text relative to the current setting of cex.

label.bump.x

bump on the x coordinate of label text.

label.bump.y

bump on the y coordinate of label text.

list.par

arguments to be passed to par. It needs to be a named list.