fopt: This function computes the optimal shape parameter a1 for a...

Description Usage Arguments Value

View source: R/posterior_lor.R

Description

This function computes the optimal shape parameter a1 for a given set of constraints shape parameters estimate the P(OR > target.or). fopt estimate the P(OR > target.or) given shape parameters for case and control allele frequency

Usage

1
fopt(a1, target.prob, target.or, p, a0, b0)

Arguments

a1

a scalar - beta distribution alpha shape parameter for prior on allele frequency in cases

target.prob

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

target.or

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

p

- a vector of values to optimise over

a0

a scalar - beta distribution alpha shape parameter for prior on allele frequency in controls

b0

a scalar - beta distribution beta shape parameter for prior on allele frequency in controls

Value

scalar - P(sim.or>target.or)


ollyburren/cupcake documentation built on July 30, 2020, 9:58 a.m.