standard_confint {IVDML}R Documentation

Compute Standard Confidence Interval for the Treatment Effect Estimate in an IVDML Object

Description

This function calculates a standard confidence interval for the estimated (potentially heterogeneous) treatment effect from a fitted IVDML object (output of fit_IVDML()). The confidence interval is computed using the normal approximation method using the standard error computed by se() and the treatment effect estimate from coef().

Usage

standard_confint(
  object,
  iv_method,
  a = NULL,
  A = NULL,
  kernel_name = NULL,
  bandwidth = NULL,
  level = 0.95
)

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.

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 object 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).

level

Numeric (default: 0.95). The confidence level for the interval (e.g., 0.95 for a 95% confidence interval).

Value

description A list containing:

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")
standard_confint(fit, iv_method = "mlIV")
standard_confint(fit, iv_method = "mlIV", a = 0, A = A,
                 kernel_name = "boxcar", bandwidth = 0.2, level = 0.95)


[Package IVDML version 1.0.0 Index]