extrp.pi0.master: Extrapolate the Estimates of P-value Density at 1 from...

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

Description

This is the second step of the Subsampling-Extrapolation (SubEx) procedure for estimating the proportion of TRUE null hypotheses, i.e., pi0, when a large number of two-sample t-tests are simultaneously performed. It regresses the p-value density estimates at 1 from subsamples over various subsample sizes and extrapolates the curve/plane to infinite sample sizes in each treatment group. This estimated limit is used to estimate pi0.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
extrp.pi0(dat,slope.constraint=TRUE, gamma2.range=2^c(-4,3),
         rate.margin=c(0.5,0.5), plotit=TRUE) 
extrp.pi0.only(n1,n2,y,gam2)
extrp.pi0.slope(n1,n2,y,gam2,eps=1e-5)
extrp.pi0.rate(n1,n2,y,gam2,rate.interval=c(.3,2),eps=1e-5)
extrp.pi0.both(n1,n2,y,gam2,rate.interval=c(.3,2),eps=1e-5)
extrp.pi0.gam2(n1,n2,y,gam2.interval=c(1e-3,6))
extrp.pi0.slope.gam2(n1,n2,y,gam2.interval=c(1e-3,6),eps=1e-5)
extrp.pi0.rate.gam2(n1,n2,y,gam2.interval=c(1e-3,6),rate.interval=c(.3,2),eps=1e-5)
extrp.pi0.both.gam2(n1,n2,y,gam2.interval=c(1e-3,6),rate.interval=c(.3,2),eps=1e-5)

Arguments

dat

an object of class subt; typically resulting from calling the function subt.

slope.constraint

logical: whether slope a should be constrained to be positive

gamma2.range, gam2.interval

a numeric vector of length 2, defining the appropriate range of the gamma square parameter. When they are equal, it is assumed as known.

rate.margin

a numeric vector of length 2, defining the margin of c parameter. When they are equal, it is assumed as known.

plotit

logical: whether plot should be produced

n1,n2

subsample size vectors for each of the two treatment groups.

y

a numeric vector of estimated pi0 at the corresponding subsample sizes.

gam2

gamma square value, assumed to be known.

rate.interval

a numeric vector of length 2 defining the appropriate range of rate parameter.

eps

a small number of tolerance.

Details

Two regression functions may be used, as specified by nparm. One is assuming the nonzero standardized effect sizes have a marginal distribution of zero mean normal distribution with variance gamma^2. This regression function has two parameters,

f1=(1-pi0)sqrt[(n1+n2)/(n1+n2+n1*n2*gamma^2)]+pi0,

where f1 is the density estimates at 1 for subsamples, n1 and n2 are the corresponding subsampling sizes, 0<=pi0<=1, and gamma^2>0.
The other regression function is more flexible by replacing the square root and the 1-pi0 term with another two parameters:

f1=a*[(n1+n2)/(n1+n2+n1*n2*gamma^2)]^c+pi0,

subject to additional constraints of a>0 and c>0.

It is highly recommended to have rgl package available to display the estimated regression surface and possibly rotate it with the mouse.

Value

an object of class extrpi0, which is a numeric vector of length 1, named "pi0", giving the estimated pi0, with the following attributes:

attr(,'fitted.obj')

a list, which is the object returned by FUN.

attr(,'nparm')

the same as the first element of nparm.

attr(,'extrpFUN')

the same as FUN.

attr(,'start.val')

the first nparm elements of starts.

attr(,'subt.data')

the same as dat.

Note

Only extrap.pi0 is expected to be called by a user. Other functions are called within this master function. But if problem occurs, the user may call each individual function to perform the extrapolation. These functions differ in the free parameters (shown in the function names) to be estimated.

Author(s)

Long Qu

References

Qu, L., Nettleton, D., Dekkers, J.C.M. Subsampling Based Bias Reduction in Estimating the Proportion of Differentially Expressed Genes from Microarray Data. Unpublished manuscript.

See Also

subt, subex, constrOptim, optimize, lsei, print.extrpi0, plot.extrpi0.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
set.seed(9992722)
## this is how the 'simulatedDat' data set in this package generated
simulatedDat=sim.dat(G=5000)	
## this is how the 'simulatedSubt' object in this package generated
simulatedSubt=subt(simulatedDat,balanced=FALSE,max.reps=Inf)
## this is how the 'simulatedExtrpi0' data set in this package generated
simulatedExtrpi0=extrp.pi0(simulatedSubt)

## End(Not run)
data(simulatedExtrpi0)
summary(simulatedExtrpi0)

pi0 documentation built on July 9, 2017, 9:01 a.m.