post_lor
samples from the posterior distribution of log(OR) given genotype.post_lor.Rd
This function samples from the posterior distribution of log(OR) based on the observation of a case genotype
post_lor
samples from the posterior distribution of log(OR) given genotype.
post_lor(gt = c(0, 1, 2), a1, b1, p0, nsim)
gt | a scalar - takes the values 0 - reference hom, 1 - het, 2 - alternative hom. |
---|---|
a1 | a scalar - beta distribution alpha shape parameter for prior on allele frequency in cases |
b1 | a scalar - beta distribution beta shape parameter for prior on allele frequency in cases |
p0 | a vector - a set of samples from beta(a0,b0) i.e. prior on control allele frequency |
nsim | a scalar - number of log odds ratios to simulate from the posterior distribution |
vector of simulated log(OR) from the posterior.