This function calculates the posterior expectation of the log odds ratio for a number of case genotypes given control allele frequency

lor_nf(f0, n0, g, target.or = 2, target.prob = 0.05, n.steps = 10)

Arguments

f0

a scalar - allele frequency in controls

n0

a scalar - number of control individuals sampled

g

a vector of length 3 given the number of 00, 01 and 11 genotypes seen

target.or

a scalar - an odds ratio threshold to compute P(sim.or > target.or)

target.prob

a scalar - a probability that a sampled variant will exceed target.or

n.steps

an integer - length of search grid to employ - larger gives a more accurate integral estimate

Value

a list object

  1. 00 - mean lor for reference hom

  2. 01 - mean lor for het

  3. 11 - mean lor for alternative hom

  4. quant00 - quantiles for posterior distribution of allele frequency in cases for ref hom

  5. quant01 - quantiles for posterior distribution of allele frequency in cases for het

  6. quant11 - quantiles for posterior distribution of allele frequency in cases for alt hom