ME.log: Provides Reliable LFDR Estimates by Selecting an Appropriate...

Description Usage Arguments Details Value Note Author(s) References Examples

Description

Selects an appropriate reference class given two reference classes. Considers two vecotr of LFDR estimates computed based on the two alternative reference classes and provides a vector of more reliable LFDR estimates.

Usage

1
2
ME.log(stat,lfdr.C,p0.C,ncp.C,p0.S,ncp.S,a=3,lower.p0=0,upper.p0=1,
lower.ncp=0.1,upper.ncp=50,length.p0=200,length.ncp=200)

Arguments

stat

A vector of test statistics for SNPs falling inside the intersection of the separate and combined reference classes.

lfdr.C

A data frame of local false discovery rates of features falling inside the intersection of the separate and combined reference classes, computed based on all features belonging to the combined reference class.

p0.C

An estimate of the proportion of the non-associated features applied to the combined reference class.

ncp.C

A non-centrality parameter applied to the combined reference class.

p0.S

An estimate of the proportion of the non-associated features applied to the separate reference class.

ncp.S

A non-centrality parameter applied to the separate reference class.

a

Parameter used to define the grade of evidence that alternative reference class should be favoured instead of the separate reference class.

lower.p0

The lower bound for the proportion of unassociated features.

upper.p0

The upper bound for the proportion of unassociated features.

lower.ncp

The lower bound for the non-centrality parameter.

upper.ncp

The lower bound for the non-centrality parameter.

length.p0

Desired length of a sequence vector containing the proportion of non-associated features. The sequences starts from lower.p0 and ends at upper.p0.

length.ncp

Desired length of a sequence vector containing non-centrality parameters. The sequences starts from lower.ncp and ends up at upper.ncp.

Details

The terms ‘separate’ and ‘combined’ reference classes are used when one sample population (reference class) is a subset of the other. Detailed explanations can be found in the vignette "Using the LFDREmpiricalBayes Package".

Value

Returns the following values:

p0.hat

estimate of the proportion of non-associated SNPs

ncp.hat

estimate of the non-centrality parameter

LFDR.hat

A vector of LFDR estimates for features falling inside the intersection of the separate and combined reference classes, obtained by the Maximum Entropy method.

Note

The vector of test statistics: stat, need to be positive values in order for the function ME.log to work.

Author(s)

Code: Ali Karimnezhad.
Documentation: Johnary Kim and Anna Akpawu.

References

Karimnezhad, A. and Bickel, D. R. (2016). Incorporating prior knowledge about genetic variants into the analysis of genetic association data: An empirical Bayes approach. Working paper. Retrieved from http://hdl.handle.net/10393/34889

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#import the function ``lfdr.mle'' from package``LFDR.MLE''
library(LFDR.MLE)

#Consider a separate reference class and a combined reference class below:

n.SNPs.S<-3  # number of SNPs in the separate reference class
n.SNPs.Sc<-2 # number of SNPs in the complement of the separate reference class.

#Create a series of test statistics for SNPs in the separate reference class.
stat.Small<-rchisq(n.SNPs.S,df=1,ncp=0)
ncp.Sc<-10

#Create a series of test statistics for SNPs in the combined reference class.
stat.Big<-c(stat.Small,rchisq(n.SNPs.Sc,df=1,ncp=ncp.Sc))

#Using lfdr.mle, a series of arguments are used.
dFUN=dchisq; lower.ncp = .1; upper.ncp = 50;
lower.p0 = 0; upper.p0 = 1;

#Maximum Likelihood estimates for the LFDRs of SNPs in the created
# separate reference class.

#Separate reference class.
estimates.S<-lfdr.mle(x=stat.Small,dFUN=dchisq,df=1,lower.ncp = lower.ncp,
upper.ncp = upper.ncp)
LFDR.Small<-estimates.S$LFDR
p0.Small<-estimates.S$p0.hat
ncp.Small<-estimates.S$ncp.hat

# Maximum Likelihood estimates for the LFDRs of SNPs in the created combined
# reference class.
estimates.C<-lfdr.mle(x=stat.Big,dFUN=dchisq,df=1,lower.ncp = lower.ncp,
upper.ncp = upper.ncp)
LFDR.Big<-estimates.C$LFDR
p0.Big<-estimates.C$p0.hat
ncp.Big<-estimates.C$ncp.hat


#The first three values of the combined reference class correspond to the
#separate reference class in this example
LFDR.SBig<-LFDR.Big[1:3]

LFDR.ME<-ME.log(stat=stat.Small,lfdr.C=LFDR.SBig,p0.C=p0.Big,ncp.C=ncp.Big,
p0.S=p0.Small,ncp.S=ncp.Small)

LFDR.ME

LFDREmpiricalBayes documentation built on May 2, 2019, 6:38 a.m.