Skip to contents

Phase 1.g delegates to rbounds when installed and the wilcoxon or sign method is requested; otherwise falls back to the base-R normal-approximation implementation originally shipped with rmorie. The mcnemar path is always served by the inline binomial formula (rbounds does not expose a McNemar entry point on CRAN).

Usage

rosenbaum_bounds(
  treated_outcomes,
  control_outcomes,
  gamma_range = NULL,
  method = "wilcoxon"
)

Arguments

treated_outcomes

Vector of outcomes for treated units.

control_outcomes

Vector of outcomes for matched controls.

gamma_range

Numeric vector of Gamma values (default seq(1, 5, by = 0.25)).

method

One of "wilcoxon", "sign", "mcnemar".

Value

A morie_rosenbaum_bounds named-list.

Examples

set.seed(1)
str(rosenbaum_bounds(rnorm(30, 0.5), rnorm(30)), max.level = 1)
#> List of 6
#>  $ gamma_values  : num [1:18] 1 1.25 1.5 1.75 2 2.25 2.5 2.75 3 3.25 ...
#>  $ p_upper       : num [1:18] 0.0272 0.0807 0.1619 0.26 0.3635 ...
#>  $ p_lower       : num [1:18] 2.72e-02 6.76e-03 1.65e-03 3.98e-04 9.55e-05 ...
#>  $ critical_gamma: num 1.25
#>  $ method        : chr "wilcoxon"
#>  $ interpretation: chr "The study conclusion is sensitive to hidden bias at Gamma = 1.25. An unobserved covariate that changes the odds"| __truncated__
#>  - attr(*, "class")= chr [1:2] "morie_rosenbaum_bounds" "list"