Description Usage Arguments Value Author(s) References See Also Examples
repSampleSizeRR and repSampleSizeRR2 implement the RR-based sample size determination method for the replication study. If the replication study has the same control-to-case ratio with the primary study, then repSampleSizeRR can be used. Otherwise, repSampleSize2 is more suitable.
| 1 2 3 | repSampleSizeRR(GRR, n, MUhat, SE, zalpha2, zalphaR2, idx = TRUE)
repSampleSizeRR2(GRR,CCR2, MUhat,SE,fU,fA,zalpha2,zalphaR2, idx=TRUE)
 | 
| GRR | The desired global replication rate. | 
| n | Sample size in the primary study. | 
| MUhat | The observed effect size (log-odds ratio). | 
| SE | The standard error of MUhat. | 
| zalpha2 | The critical value of z-values in the primary study, i.e. z_alpha/2. | 
| zalphaR2 | The critical value of z-values in the replication study, i.e. z_alphaR/2. | 
| idx | The indexes of the SNPs having been further inverstigated in the replication study. We only calculate RR for primary associations with indexes in  | 
| CCR2 | The control-to-case ratio of the replication study. | 
| fU | The allele frequency in the control group. | 
| fA | The allele frequency in the case group. | 
The determined sample size of the replication study is returned.
Wei Jiang, Jing-Hao Xue and Weichuan Yu
Maintainer: Wei Jiang <wjiangaa@connect.ust.hk>
Jiang, W., Xue, J-H, and Yu, W. What is the probability of replicating a statistically significant association in genome-wide association studies?. Submitted.
RRate
repRateEst, 
SEest,
HLtest
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | alpha<-5e-6               #Significance level in the primary study
alphaR<-5e-3              #Significance level in the replication study
zalpha2<-qnorm(1-alpha/2)
zalphaR2<-qnorm(1-alphaR/2)
##Load data
data('smryStats1')        #Example of summary statistics in 1st study
#### Sample size determination ###
n1<-4000                  #Sample size of the primary study
n2_1<-repSampleSizeRR(0.8, n1, log(smryStats1$OR),smryStats1$SE,zalpha2,zalphaR2)
CCR2<-2                   #Control-to-case ration in the replication study
n2_2<-repSampleSizeRR2(0.8, CCR2, log(smryStats1$OR),smryStats1$SE,smryStats1$F_U, 
smryStats1$F_A,zalpha2,zalphaR2)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.