robust_confint {IVDML}R Documentation

Compute Robust Confidence Interval for Treatment Effect in an IVDML Object

Description

This function computes a robust (with respect to weak IV) confidence interval/confidence set for the estimated treatment effect in a fitted IVDML object (output of fit_IVDML()). The confidence interval/confidence set is constructed by inverting the robust test from the robust_p_value_aggregated() function, which either uses the Double Machine Learning aggregation method ("DML_agg") or the quantile-based method of Meinshausen, Meier, and Bühlmann (2009) ("MMB_agg") to aggregate the p-values corresponding to the S_split cross-fitting sample splits (where S_split was an argument of the fit_IVDML() function).

Usage

robust_confint(
  object,
  iv_method,
  level = 0.95,
  a = NULL,
  A = NULL,
  kernel_name = NULL,
  bandwidth = NULL,
  CI_range = NULL,
  agg_method = "DML_agg",
  gamma = 0.5
)

Arguments

object

An object of class IVDML, produced by the fit_IVDML() function.

iv_method

Character. The instrumental variable estimation method to use. Must be one of the methods specified in the fitted object.

level

Numeric (default: 0.95). The confidence level for the confidence interval.

a

Numeric (optional). A specific value of A at which to compute the confidence interval for the heterogeneous treatment effect. If NULL, the function returns the confidence interval for the homogeneous treatment effect.

A

Numeric vector (optional). The variable with respect to which treatment effect heterogeneity is considered. If NULL, the function assumes the A used in model fitting.

kernel_name

Character (optional). The name of the kernel function to use for smoothing (if a heterogeneous treatment effect is estimated). Must be one of "boxcar", "gaussian", "epanechnikov", or "tricube".

bandwidth

Numeric (optional). The bandwidth for the kernel smoothing (if a heterogeneous treatment effect is estimated).

CI_range

Numeric vector of length 2 (optional). The search range for the confidence interval. If NULL, the function sets CI_range to be four times as large as the standard confidence interval centered at the point estimate of the treatment effect.

agg_method

Character (default: "DML_agg"). The aggregation method for computing the confidence interval. Options are:

  • "DML_agg": Uses the Double Machine Learning (DML) aggregation approach.

  • "MMB_agg": Uses the quantile-based aggregation method of Meinshausen, Meier, and Bühlmann (2009).

gamma

Numeric (default: 0.5). Quantile level for the "MMB_agg" method. Ignored if agg_method = "DML_agg".

Value

A list with the following elements:

References

Meinshausen, N., Meier, L., & Bühlmann, P. (2009). P-values for high-dimensional regression. Journal of the American Statistical Association, 104(488), 1671–1681.

Examples

set.seed(1)
Z <- rnorm(100)
X <- Z + rnorm(100)
H <- rnorm(100)
D <- Z^2 + sin(X) + H + rnorm(100)
A <- X
Y <- tanh(A) * D + cos(X) - H + rnorm(100)
fit <- fit_IVDML(Y = Y, D = D, Z = Z, X = X, ml_method = "gam")
robust_confint(fit, iv_method = "mlIV", CI_range = c(-10, 10))
robust_confint(fit, iv_method = "mlIV", a = 0, A = A,
               kernel_name = "boxcar", bandwidth = 0.2, CI_range = c(-10, 10))


[Package IVDML version 1.0.0 Index]