snpSampleSize {Haplin}R Documentation

Sample size calculations for a single SNP

Description

Sample size calculations for a single SNP. Allows for sample size calculations of several combinations simultaneously.

Usage

snpSampleSize(fam.cases, fam.controls, fraction = 0.5,
RR, MAF, alpha = 0.05, power = 0.80)

Arguments

fam.cases

A character vector of the case family design. The possible family designs are "mfc" (full triad), "mc" (mother-child dyad), "fc" (father-child dyad) and "c" (a single case child).

fam.controls

A character vector of the control family design. The possible family designs are "mfc" (full triad), "mc" (mother-child-dyad), "fc" (father-child dyad), "mf" (mother-father dyad), "c" (a single control child), "m" (a single control mother), "f" (a single control father) or "no_controls" (no control families).

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 fam.controls equals "no_controls", fraction is automatically set to 1.

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.

Details

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.

Value

snpSampleSize returns a data frame containing the combinations of input variables and the corresponding sample size calculations.

Author(s)

Miriam Gjerdevik,
with Hakon K. Gjessing
Professor of Biostatistics
Division of Epidemiology
Norwegian Institute of Public Health

hakon.gjessing@uib.no

References

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

See Also

haplin, snpPower

Examples


## 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))


[Package Haplin version 7.3.1 Index]