A power calculator for Genome-wide association studies (GWAs) with combined gold (error-free) and silver (erroneous) phenotyping per McDavid A, Crane PK, Newton KM, Crosslin DR, et al. (2011)
is.legal all use common parameters.
chisq.sim.factory returns a function that repeatedly calculates chi-square statistics (X^2) and point estimates of allelic odds ratios (
allelicOR) for a study specified by the simulation parameters.
chisq.lytic.func returns lambda, the non-centrality parameter of the asymptotic sampling distribution of (X^2), which happens to be non-central chi-square with two degrees of freedom.
dlambda returns the derivative of lambda with respect to
gam_co. If this is positive then power is increasing with the addition of a silver-standard subject.
is.legal determines if the parameters provided are ‘legal’ in the sense of inducing valid probabilities in affected and unaffected populations in the simulation
Maintainer: Andrew McDavid <[email protected]>
See McDavid A, Crane PK, Newton KM, Crosslin DR, et al. (2011) for a full description of the model and parameters.
1 2 3 4 5 6 7
##Make a chisq simulator under a study scenario sim = chisq.sim.factory(R = 4, gam_ca = 3, gam_co = 0, ppv = .8, npv = 1, homRR = 2.2, N_co = 1000, maf = .1, prev = .01, model = "mult") ##Run one realization of the simulation sim()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.