lfdr.l1o: Leave-one-out (L1O) and leave-half-out (LHO) method for LFDR...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/LFDR.MLEye.v0.R

Description

Estimate the local false discovery rate using the leave-one-out method (L1O) or the leave-half-out method (LHO).

Usage

1
2
3
4
5
6
7
8
lfdr.l1o(x, dFUN = dabsTd, lower.ncp = 0.001, upper.ncp = 20, lower.p0 = 0,
      upper.p0 = 1, fixed.p0 = NULL, fixed.ncp = NULL, d0 = 0, ...)

lfdr.lho(x, dFUN = dabsTd, lower.ncp = 0.001, upper.ncp = 20, lower.p0 = 0,  
      upper.p0 = 1, fixed.p0 = NULL, fixed.ncp = NULL, d0 = 0, ...)

lfdr.lo(x, dFUN = dabsTd, lower.ncp = 0.001, upper.ncp = 20, lower.p0 = 0,
      upper.p0 = 1, fixed.p0 = NULL, fixed.ncp = NULL, v = 0, d0 = 0, ...)

Arguments

x

Input numeric vector of statistics.

dFUN

Density function; default dabsTd (from absolute value of the Student t distribution)

lower.ncp

The lowerbound of the location parameter of dFUN (noncentrality parameter for default dFUN=dabsTd); default value is 0.001

upper.ncp

The upperbound of the location parameter of dFUN (noncentrality parameter for default dFUN=dabsTd); default value is 20

lower.p0

The lowerbound of p0 (proportion of unaffected features (null hypothesis)); default value is 0

upper.p0

The upperbound of p0 (proportion of unaffected features (null hypothesis)); default value is 1

fixed.p0

A fixed value of p0 (proportion of unaffected features (null hypothesis)); default value is NULL

fixed.ncp

A fixed value of the location parameter of dFUN (noncentrality parameter for default dFUN=dabsTd); default value is NULL

v

v in [0,1], portion of one feature that is considered in turn to estimate the LFDR; default value is v=0 (for lfdr.l1o (L1O)) and v=1/2 (for lfdr.lho (LHO)). For other values of v, use lfdr.lo.

d0

the numeric value of the null hypothesis for dFUN, default value is 0.

...

Other parameters to pass to dFUN (see notes and examples).

Value

A list with:

LFDR.hat

estimates of the LFDR

p0.hat

estimate of the proportion of unaffected features p0 (true null hypothesis).

ncp.hat

estimate of the location parameter of the distribution dFUN (ncp: noncentrality parameter of dFUN=dabsTd by default).

info

method name and information about computation failure.

Note

- Requires fixed.p0=NULL.

- The probability density function (dFUN) can be set to any other distribution, adapted so that the location parameter corresponds to ncp, other parameter to df and any other can be passed to dFUN by the dots (see examples in lfdr.mle).

- If computation fails for all features, p0.hat is set to NA and so is LFDR.hat, which is a vector of NA with lengh equal to the number of features. If it fails for a given feature, only the resulting LFDR for that feature is set to NA. Error messages are not suppressed.

Author(s)

Code: Marta Padilla
Documentation: Alaa Ali, Kyle Leckett, Marta Padilla.

References

Padilla, M., & Bickel, D. R. (2012). Estimators of the local false discovery rate designed for small numbers of tests. Statistical Applications in Genetics and Molecular Biology, 11(5), art. 4.

See Also

lfdr.mle, lfdr.mdl.

Examples

1
2
3
4
5
6
7
8
9
dfx <- 4;n.alt <- 1;n.null <- 4;true.ncp <- 7
#numeric imput data: statistics of the data with missing values (removed internally)
#(result of a absolute t.test statistics on the data)
W<-abs(c(rt(n=n.alt,ncp=true.ncp,df=dfx),rt(n=n.null,ncp=0,df=dfx)))
W[3]<-NA

z1<-lfdr.l1o(x=W,df=dfx)
z2<-lfdr.lho(x=W,df=dfx,fixed.ncp=10)
z3<-lfdr.lo(x=W,df=dfx,v=1/3,fixed.p0=0.3)

LFDR.MLE documentation built on Oct. 2, 2019, 5:02 p.m.