Learn R Programming

pi0 (version 1.4-1)

subex: Subsampling-Extrapolation Based Estimation of Proportion of True Null Hypotheses and False Discovery Rates for Microarray Data

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

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.

Value

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

pi0

a numeric value, giving the estimated \(\pi_0\)

.
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.

Details

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

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

Run this code
# 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)
# }
# NOT RUN {
data(simulatedSubex)
print(simulatedSubex)
# }

Run the code above in your browser using DataLab