View source: R/snpSampleSize.R
snpSampleSize | R Documentation |
Sample size calculations for a single SNP. Allows for sample size calculations of several combinations simultaneously.
snpSampleSize(fam.cases, fam.controls, fraction = 0.5,
RR, MAF, alpha = 0.05, power = 0.80)
fam.cases |
A character vector of the case family design. The possible family designs are |
fam.controls |
A character vector of the control family design. The possible family designs are |
fraction |
A numeric vector of the proportion of case families. Equals 0.5 by default, i.e. there are as many case families as control families. If |
RR |
A numeric vector of the relative risks (the effect sizes of interest). |
MAF |
A numeric vector of the minor allele frequencies. |
alpha |
A numeric vector of the Type I Errors. Equals 0.05 by default. |
power |
A numeric vector of the desired probability of identifying a difference in the relative risks. Default is 0.80. |
snpSampleSize
computes the number of case and control families required for a single SNP to attain the desired power.
It assumes a multiplicative dose-response model.
snpSampleSize
calculates the fraction of case alleles corresponding to the given family designs
and then uses the asymptotic normal approximation for the natural logarithm of the odds ratio for calculating the sample sizes
(the relative risks and odds ratios are used interchangeably due to the "rare disease assumption").
snpSampleSize
allows for sample size calculations of several combinations of the input variables at once. The Examples section provides further details.
snpSampleSize
returns a data frame containing the combinations of input variables and the corresponding sample size calculations.
Miriam Gjerdevik,
with Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health
Skare O, Jugessur A, Lie RT, Wilcox AJ, Murray JC, Lunde A, Nguyen TT, Gjessing HK. Application of a novel hybrid study design to explore gene-environment interactions in orofacial clefts. Annals of Human Genetics (2012) 76, pp. 221-236.
Web Site: https://haplin.bitbucket.io
haplin
, snpPower
## Compute sample sizes for a single SNP,
## when the specified case family design is a full triad, there are no control families,
## RR = 1.1, MAF = 0.1, alpha = 0.05 and power = 0.9
snpSampleSize(fam.cases = "mfc", fam.controls = "no_controls",
RR = 1.1, MAF = 0.1, alpha = 0.05, power = 0.9)
## Compute sample sizes for a single SNP,
## for the combination of case triads, control triads, fraction = 0.5, RR = 1.2,
## MAF = 0.1, alpha = 0.05 and power = 0.8, and also for the combination of case triads,
## control children, fraction = 0.5, RR = 1.2, MAF = 0.1, alpha = 0.05 and power = 0.9
snpSampleSize(fam.cases = "mfc", fam.controls = c("mfc", "c"),
RR = 1.2, MAF = 0.1, alpha = 0.05, power = c(0.8, 0.9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.