Learn R Programming

sensitivityIxJ (version 0.1.5)

generic.I.by.J.sensitivity.point.probability: Compute the exact Probability of a Single Table for the Generic Bias Model

Description

This function computes the probability of a single contingency table under the generic bias model given an unmeasured confounder. This is an auxiliary function for the p-value computation.

Usage

generic.I.by.J.sensitivity.point.probability(
  table,
  row = "treatment",
  u_allocation,
  gamma,
  delta,
  shared_divisor = 1e+06
)

Value

This function returns the probability mass of this table given a unmeasured confounder.

Arguments

table

A matrix or table object representing the observed contingency table.

row

A string indicating whether rows represent "outcome" or "treatment". Must be either "outcome" or "treatment". Default is "treatment".

u_allocation

A vector where each entry represents the number of u_i=1 in an outcome level. The first entry represents the number of u_i=1 among the subjects with outcome as one.

gamma

A scalar

delta

A binary vector with no more than two unique values, corresponding to treatment levels. The length must match the number of treatments (rows of obs.table if row = "treatment", or columns if row = "outcome").

shared_divisor

A scalar to rescale the numerator and the denominator of the probability mass function to prevent overflow. Defaulted to 1000000.