R/bias-bounds.R
dml_bounds.RdComputes confidence bounds on the target parameter of interest accounting for omitted variable biases.
dml_bounds(model, cf.y, cf.d, rho2 = 1)
confidence_bounds(...)
# S3 method for class 'numeric'
confidence_bounds(
theta.s,
S2,
se.theta.s,
se.S2,
cov.theta.S2,
cf.y,
cf.d,
rho2 = 1,
combine.method = "median",
level = 0.95,
...
)
# S3 method for class 'dml'
confidence_bounds(
model,
cf.y,
cf.d,
rho2 = 1,
level = 0.95,
combine.method = "median",
...
)
# S3 method for class 'dml.bounds'
confidence_bounds(
model,
cf.y = NULL,
cf.d = NULL,
rho2 = NULL,
level = 0.95,
combine.method = "median",
return = c("lwr", "upr"),
...
)an object of class dml or dml_bounds.
(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.
degree of adversity. Default is rho2 = 1, which assumes the maximum degree of adversity of confounding.
arguments passed to other methods.
short estimate of the target parameter (used as the first argument for the numeric method).
estimated variance product (sigma2 * nu2).
standard error of the short estimate.
standard error of S2.
covariance of theta.s and S2.
method to combine the results of each repetition. Options are mean and median. Default is median.
confidence level. Default is 0.95.
character vector specifying which bounds to return. Options are "lwr" and "upr".
For dml_bounds: an object of class dml.bounds. For confidence_bounds: a matrix or numeric vector of confidence bounds.
Chernozhukov, V., Cinelli, C., Newey, W., Sharma, A., and Syrgkanis, V. (2026). "Long Story Short: Omitted Variable Bias in Causal Machine Learning." Review of Economics and Statistics. doi:10.1162/REST.a.1705
Wang, J., Sant'Anna, P. H. C., Chernozhukov, V., and Cinelli, C. (2026). "Omitted Variable Bias in Difference-in-Differences Designs." Working Paper. (Conditional ATT/ATU formulation.)
data("pension")
set.seed(3); idx <- sample(nrow(pension), 2000)
y <- pension$net_tfa[idx]
d <- pension$e401[idx]
x <- model.matrix(~ -1 + age + inc + educ + fsize + marr + twoearn + pira + hown,
data = pension[idx, ])
fit <- dml(y, d, x, model = "plm", cf.folds = 2, cf.seed = 3, verbose = FALSE)
# bounds on the ATE under postulated confounding strength
dml_bounds(fit, cf.y = 0.03, cf.d = 0.03)
#>
#> Debiased Machine Learning: Bounds on Omitted Variable Bias
#>
#> Sensitivity Parameters
#> cf.y = 0.03
#> cf.d = 0.03
#> rho2 = 1
#>
#>
#> Bounds on Average Treatment Effect
#>
#> Estimate Std. Error t value P(>|t|)
#> Short Estimate 12966 3354 3.9 1e-04 ***
#> |Bias| Bound 3611 611 5.9 3e-09 ***
#> Lower Bound 9356 3212 2.9 0.004 **
#> Upper Bound 16577 3596 4.6 4e-06 ***
#> ---
#> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
#>
#> Note: DML estimates combined using the median method.
confidence_bounds(fit, cf.y = 0.03, cf.d = 0.03, level = 0.95)
#> lwr upr
#> ate 4073.0 22491.7
#>
#> Confidence level: point = 95%; region = 90%.
#> Sensitivity parameters: cf.y = 0.03; cf.d = 0.03; rho2 = 1.