Skip to contents

Wrapper around sens_obs_two_types() that works on the e-value scale. For a given e-value threshold \(e_\star\), this function finds the odds ratio \(\omega\) at which the conservative e-value (as returned by find_e_two_types()) would be equal to \(e_\star\).

Because the underlying calibration is via \(p_{\max}\) and e_from_p(), this is equivalent to asking for the odds ratio at which the p-value upper bound would be \(\alpha_\star = 1 / e_\star\), and then calling sens_obs_two_types() with p_threshold = alpha_star. oai_citation:5‡p_value_process_tracing.pdf

Usage

sens_urn_evalue(
  obs_support,
  total_obs,
  rival_obs = NULL,
  weights = NULL,
  e_threshold
)

Arguments

obs_support

An integer representing the number of observations in favor of the working hypothesis. Must be less than or equal to the total.

total_obs

An integer representing the total number of observations

rival_obs

Optional. The number of observations in the urn that do not support the working theory.

weights

A vector of numeric weights representing the differential evidentiary weight of the working theory supporting observations.

e_threshold

Numeric scalar \(> 0\). Target e-value at which to assess sensitivity.

Value

Whatever sens_obs_two_types() returns (typically a list including the odds-ratio \(\omega\)); the only difference is that you parameterize the problem by an e-value threshold rather than a p-value threshold.

Examples

# Suppose we observed 7 supportive pieces of evidence out of 10.
# How large must the observation bias be for the e-value to drop to ~2
# (i.e. roughly p >= 0.5)?
sens_urn_evalue(obs_support = 7, total_obs = 10, e_threshold = 2)
#> $w
#> [1] 10.84011
#> 
#> $p
#> [1] 0.4999997
#>