Learn R Programming

bimetallic (version 1.0)

bimetallic-package: Power for SNP analyses using silver standard cases

Description

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)

Arguments

Details

Package:
bimetallic
Type:
Package
Version:
1.0
Date:
2011-08-03
License:
GPL-2
LazyLoad:
yes
chisq.sim.factory, chisq.lytic.func and dlambda, 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_ca or 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

References

See McDavid A, Crane PK, Newton KM, Crosslin DR, et al. (2011) for a full description of the model and parameters.

Examples

Run this code
##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()

Run the code above in your browser using DataLab