tqvalue: The exponential tilting mixture model

Description Usage Arguments Value Examples

Description

This function tilts the mixture model fitted from the training tail-areas (or p-values) by conditioning on the average of local fdr's from the testing tail-areas (or p-values)

Usage

1
2
3
4
5
tqvalue(xl, xt, w = NULL, a = NULL, precision = 1e-08, MaxIter = 10000L,
  interval = NULL, adjust = TRUE, method = c("m1", "m2"),
  type = c("left tail area", "pvalue"), alpha = 0.9, q = 0.1,
  ncores = 1, rel.tol = .Machine$double.eps^0.25,
  tol = .Machine$double.eps^0.5, eps = .Machine$double.eps^0.6)

Arguments

xl

The training left-tail areas (or p-values)

xt

The testing left-tail areas (or p-values)

w

A vector of two numeric values, representing the weights of the uniform and Beta distributions. See UBMM.

a

A vector of two initial parameter values for Beta distribution. See UBMM.

precision

The precision for convergence. Default value is 1e-8.

MaxIter

The maximum iteration for the EM algorhthm.

interval

A vector of two numeric values, which determines the range to search the optimal theta. Default is c(-1000L,1000L).

adjust

Whether or not to do the model adjustment. Default is TRUE.

method

A character chosen from m1, m2. Default is m1.

type

A character value, chosen from “left tail area” and “pvalue”. Default is “left tail area”.

alpha

A numeric value. Used in method “m1” to determine the probably null region. Default is 0.9.

q

A numeric value. The global false discovery rate used in method “m2”, to determine the probable null region. Default is 0.1.

ncores

The number of cpus used for implementing this function.

rel.tol

the accuracy used in integrate.

tol

the accuracy used in uniroot.

eps

the smallest positive precision. If x < eps, x = eps; if x > 1-eps, x = 1-eps.

Value

A dataframe includes xl, xt, fdr, FDR, tfdr, and tFDR, respectively. fdr and FDR are the local and global false discovery rate for each value of xt. tfdr and tFDR are the corresponding tilted local and global false discovery rate, respectively.

The optimal theta calculated by solving log(E(exp(thetah(x))))-ctheta, where c=mean(h(xt)).

Examples

1
2
3
4
5
6
7
xl=c(rbeta(50,0.2,0.2),runif(950))
xt=c(rbeta(50,0.1,0.1),runif(950))

## Not run: 
tqvalue(xl,xt,ncores=4,adjust=FALSE,type="left tail area")

## End(Not run)

chongma1989/tiltmod documentation built on May 7, 2019, 8:38 a.m.