Skip to contents

Closed-form Cinelli-Hazlett (2020) sensitivity from the estimate, its standard error and the residual degrees of freedom. Robustness values as sensemakr::robustness_value: with \(f_q = q |t| / \sqrt{dof}\), \(RV_q = (\sqrt{f_q^4 + 4 f_q^2} - f_q^2) / 2\), and \(RV_{q,\alpha}\) the same in \(f_q - f^*\), \(f^* = |t^*_{\alpha, dof-1}| / \sqrt{dof - 1}\) (the extreme robustness value when \(f_q > 1/f^*\)). Benchmark bounds follow sensemakr::ovb_bounds. For a fitted lm see morie_sensitivity_omitted_var_bias.

Usage

omitted_variable_bias(
  estimate,
  se,
  dof,
  r2_yd_x,
  partial_r2_treatment,
  q = 1,
  alpha = 0.05,
  benchmark_covariates = NULL,
  kd = 1,
  ky = kd
)

Arguments

estimate

Treatment coefficient.

se

SE of the estimate.

dof

Residual degrees of freedom.

r2_yd_x

Partial R^2 of treatment with outcome.

partial_r2_treatment

Same as r2_yd_x (for clarity).

q

Fraction of the estimate to be explained away. Default 1.

alpha

Significance level. Default 0.05.

benchmark_covariates

Named list mapping covariate name to c(r2_dxj_x, r2_yxj_dx): its partial R^2 with the treatment (given the other covariates) and with the outcome (given treatment and the other covariates). A single number is used for both.

kd, ky

Strength multipliers of the confounder relative to a benchmark (ky defaults to kd).

Value

A morie_ovb named-list; benchmark_bounds maps each covariate to a one-row data frame with r2dz.x, r2yz.dx, adjusted_estimate, adjusted_se, adjusted_t, adjusted_lower_CI, adjusted_upper_CI.

References

Cinelli, C., & Hazlett, C. (2020). Making sense of sensitivity: extending omitted variable bias. Journal of the Royal Statistical Society B, 82(1), 39–67.

Examples

str(omitted_variable_bias(0.5, 0.15, dof = 150, r2_yd_x = 0.1,
                          partial_r2_treatment = 0.05), max.level = 1)
#> List of 7
#>  $ estimate            : num 0.5
#>  $ se                  : num 0.15
#>  $ rv_q                : num 0.238
#>  $ rv_qa               : num 0.104
#>  $ partial_r2_treatment: num 0.05
#>  $ benchmark_bounds    : list()
#>  $ interpretation      : chr "To explain away 100% of the estimate (0.5000), an unobserved confounder would need partial R^2 >= 0.2376 with b"| __truncated__
#>  - attr(*, "class")= chr [1:2] "morie_ovb" "list"