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.
generic.I.by.J.sensitivity.point.probability(
table,
row = "treatment",
u_allocation,
gamma,
delta,
shared_divisor = 1e+06
)This function returns the probability mass of this table given a unmeasured confounder.
A matrix or table object representing the observed contingency table.
A string indicating whether rows represent "outcome" or "treatment". Must be either "outcome" or "treatment". Default is "treatment".
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.
A scalar
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").
A scalar to rescale the numerator and the denominator of the probability mass function to prevent overflow. Defaulted to 1000000.