Learn R Programming

trio (version 3.10.0)

trio.power: Power and sample size calculation

Description

Computes power for genotypic TDT, allelic TDT or Score test given n trios or required sample size to gain given power.

Usage

trio.power(maf = 0.5, RR = 1.5, alpha = 5*10^(-8), n = NULL, beta = NULL, model = c("additive", "dominant", "recessive"), test = c("gTDT", "Score", "aTDT")) "print"(x,digits=4,...)

Arguments

maf
a numeric vector of population frequencies of a mutant allele.
RR
a numeric vector of the assumed relative risks for an individual getting a disease with 1 (in case of recessive model 2) mutant alleles compared to the risk of individuals carnying 0 mutant alleles.
alpha
a numeric vector of significance levels (Type I Error probability).
n
a numeric vector containing number of trios in a study. Must be filled for power calculation. Must not be NULL for sample size calculation.
beta
the desired power of the test. Must be filled for power calculation. Must not be NULL for sample size calculation.
model
a character containing the genotypic model assumed. Possible values are "additive", "dominant" and "recessive". In case of test="aTDT", the standard multiplicative model will be considered. Abbreviations are allowed. Thus, e.g., model = "dom" will fit a dominant model, and model = "r" a recessive model.
test
the chosen test. Must be "aTDT", "gTDT" or "Score". Abbreviations are allowed. Thus, e.g., test = "g" will perform a genotypic TDT, and test = "S" a Score test.
x
an object of class trio.power.
digits
number of digits that should be printed.
...
ignored

Value

An object of class trio.power containing the following numeric values or vectors, respectively:
model
the chosen model
size
In case of sample size calculation: calculated sample sizes
beta
In case of sample size calculation: desired power
n
In case of power calculation: given number of trios
power
In case of power calculation: calculated power
alpha
Type I error
test
the chosen test
RR
the relative risks assumed
p
the assumed allele frequency
calc
the type of calculation

Details

Power and sample size calculation is derived on Knapp (1999). The power or the sample size will be calculated for all combinations of p, RR, alpha, test, model and n or beta.

References

Knapp, M. (1999). A Note on Power Approximations for the Transmission/Disequilibrium Test. American Journal of Human Genetics, 64, 1177-1185.

Neumann, C., Taub, M.A., Younkin, S.G., Beaty, T.H., Ruczinski, I., Schwender, H. (2014). Analytic Power and Sample Size Calculation for the Genotypic Transmission/Disequilibrium Test in Case-Parent Trio Studies. Submitted.

Examples

Run this code
# The required samples size to reach of power
# of 0.8 when testing SNPs with minor allele
# frequencies of 0.1 and 0.2 with an additive
# or dominant genotypic TDT and score test
# can be determined by 
trio.power(maf = c(0.1, 0.2), beta = 0.8, model = c("add", "dom"))

Run the code above in your browser using DataLab