Skip to contents

For a range of hidden-confounding levels \(\Gamma\), tests whether the treatment effect remains significant. A large \(\Gamma\) at which the result remains significant indicates robustness.

Usage

morie_sensitivity_rosenbaum(
  treated,
  control,
  gamma_range = seq(1, 3, by = 0.2)
)

Arguments

treated

Numeric vector of outcomes for treated units.

control

Numeric vector of outcomes for control units (may differ in length from treated for unmatched designs).

gamma_range

Numeric vector of \(\Gamma\) values to test.

Value

Data frame with columns: gamma, p_lower, p_upper.

Details

Delegates to rbounds::psens() when rbounds is installed and pairs-of-equal-length data are supplied; alternatively delegates to sensitivitymv::senmv() when sensitivitymv is installed. Otherwise falls back to inline sign-score bounds (Rosenbaum 2002, Section 4.3).

References

Rosenbaum PR (2002). Observational Studies (2nd ed.). Springer.

Examples

set.seed(1)
morie_sensitivity_rosenbaum(treated = rnorm(30, 0.5), control = rnorm(30))
#>    gamma      p_lower    p_upper
#> 1    1.0 2.723125e-02 0.02723125
#> 2    1.2 8.949915e-03 0.06751092
#> 3    1.4 2.901157e-03 0.12670817
#> 4    1.6 9.333110e-04 0.19980883
#> 5    1.8 2.989651e-04 0.28060848
#> 6    2.0 9.553523e-05 0.36352352
#> 7    2.2 3.048830e-05 0.44430691
#> 8    2.4 9.723444e-06 0.52011885
#> 9    2.6 3.100311e-06 0.58931380
#> 10   2.8 9.885590e-07 0.65114927
#> 11   3.0 3.152714e-07 0.70551137