subex: Subsampling-Extrapolation Based Estimation of Proportion of...

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

Description

This function is a wrapper of subt, extrp.pi0 and fdr, and is a ready to use directly on a matrix of microarray data.

Usage

1
2
3
4
5
subex(dat, n1 = round(ncol(dat)/2), n2 = ncol(dat) - n1, 
  f1method = c("lastbin", "qvalue"), 
  max.reps = 20, balanced = FALSE, nparm = c(2, 4), 
  extrpFUN = c("constrOptim", "genoud"), 
  starts = c(pi0 = 0.75, gam2 = 1, a = 0.5, c = 0.5), plotit = TRUE)

Arguments

dat

a numeric matrix, which is the microarray data. Each row represent a gene, and each column represent a subject. The first n1 columns correspond to the first treatment group; and the rest n2 columns correspond ot the second treatment group.

n1

a positive integer, the sample size in treatment group 1.

n2

a positive integer, the sample size in treatment group 2.

f1method

character, the name of the function used to estimate the p-value density at one. See subt for details.

max.reps

a positive integer, the maximum number of subsamples "per subsample size configuration". See subt for details.

balanced

logical, indicating if only balanced subsamples are generated. See subt for details.

nparm

either 2 or 4, indicating the number of parameters used in extrapolation. See extrp.pi0 for details.

extrpFUN

character, specifying the name of the optimization function for nonlinear regression. See the FUN argument of extrp.pi0 for details.

starts

a numeric vector of length nparm, specifying the starting values of optimization. See extrp.pi0 for details.

plotit

logical, indicating if the extrapolation plot will be produced. See extrp.pi0 for details.

Details

This function calls subt, extrp.pi0, matrix.t.test and fdr sequentially to estimate the proportion of true null hypotheses pi0 as well as the false discovery rates (FDR) based on the estimated pi0.

Value

an object of class subex, which is a list 4 components:

pi0

a numeric value, giving the estimated pi0

.

extrp.fit

an object of class extrpi0, the results from calling extrp.pi0.

pvalues

a numeric vector of length the same as nrow(dat), the p-values for each gene.

qvalues

a numeric vector of length the same as nrow(dat), the q-values for each gene.

Note

Plotting using package rgl will be tried. If not available, a warning will be generated. See plot.extrpi0 for details.

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, extrp.pi0, matrix.t.test,fdr, plot.subex,print.subex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## 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 'simulatedSubex' object in this package generated
simulatedSubex=subex(simulatedDat,balanced=FALSE,max.reps=Inf,plotit=FALSE) 
plot(simulatedSubex)

## End(Not run)
data(simulatedSubex)
print(simulatedSubex)

gitlongor/pi0 documentation built on May 17, 2019, 5:29 a.m.