Learn R Programming

RRate (version 1.0)

RRate-functions: Estimating Replication Rate for primary associations

Description

repRateEst implements a replication rate estimation method. Two-component mixture prior is used in the estimation.

Usage

repRateEst(MUhat, SE, SE2, zalpha2, zalphaR2, boot = 100, output = TRUE, idx = TRUE, dir = "output", info = TRUE)

Arguments

MUhat
The observed effect size (log-odds ratio) in the primary study.
SE
The standard error of the observed log-odds ratio in the primary study.
SE2
The standard error of the observed log-odds ratio in the replication study.
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.
boot
The resampling number of bootstrop used for estimating the credible interval of the RR.
output
Bool value. To determine whether to output the estimated results in the dir or not.
idx
The indexes of the SNPs having been further inverstigated in the replication study. We only calculate RR for primary associations with indexes in idx.
dir
The directory to save the estimated results. It has effect when output=T
info
Bool value. To determine whether to show the parematers inference results in the terminal or not.

Value

repRateEst returns the RR, lfdr, prediction power and infered parameters. The returened value is a LIST: returns the RR, lfdr, prediction power and infered parameters. The returened value is a LIST:

Details

The RR estimation is based on the following two-component mixture model: mu=pi_0 delta_0+(1-pi_0) N(0, sigma_0^2).

Details can be seen the following reference paper.

References

Jiang, W., Xue, J-H, and Yu, W. What is the probability of replicating a statistically significant association in genome-wide association studies?. Submitted.

See Also

RRate, SEest, repSampleSizeRR, repSampleSizeRR2, HLtest

Examples

Run this code
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
n2.0<-2000                #Number of individuals in control group
n2.1<-2000                #Number of individuals in case group

SE2<-SEest(n2.0, n2.1, smryStats1$F_U, smryStats1$F_A) #SE in replication study
######  RR estimation  ######
RRresult<-repRateEst(log(smryStats1$OR),smryStats1$SE, SE2,zalpha2,zalphaR2, output=TRUE,dir='.')
RR<-RRresult$RR           #Estimated RR

Run the code above in your browser using DataLab