Calculate the power of a two stage design for GWAS under sample size or cost constraints. Implements methods in the refereces below.
twoStagePower(n=NULL, Cost=NULL, m=5000, mu=0.045, mu.loc=0.5, p=0.10,
f=NULL, relcost=1, true.needed=1, rho=0, rho0=0, nsim=2000)
It returns the power as a single numeric value
The maximum sample size for the study.
Maximum available resource. One of Cost
or n
must be
specified.
The number of markers in the study. Default is 5000. It will take a a long time to compute power for very large numbers e.g. 100000
The mean vector for the markers that are associated with endpoint.
The locations of the true markers. Since the chromosome is mapped to the unit interval (0,1) the numbers should be between 0 and 1.
The proportion of markers taken to the second stage. The default is 0.1 which is found to be optimal.
The fraction of Cost or sample size allocated to the first stage. If not specified it uses 0.75 for the Cost constraint scenario and 0.5 for the sample size contraint scenario.
Specifies how expensive it is to genotype in the second stage compared to the first stage.
The number of markers selected in the end. Can be a maximum of length of mu.loc (or mu).
correlation between markers
Number of Monte Carlo replications to compute power.
Jaya M. Satagopan & Venkatraman E. Seshan
This implements the method in the reference below.
Satagopan JM, Venkatraman ES, Begg CB. (2004) Two-stage designs for gene-disease association studies with sample size constraints. Biometrics
twoStagePower(n=1000)
twoStagePower(Cost=1000)
Run the code above in your browser using DataLab