The value of the tuning parameter to estimate
pi_0. Must be in [0,1). Optional, see Storey (2002).
pi0.method
Either "smoother" or "bootstrap"; the method for
automatically choosing tuning parameter in the estimation of pi_0,
the proportion of true null hypotheses.
smooth.df
Number of degrees-of-freedom to use when estimating pi_0
with a smoother. Optional.
smooth.log.pi0
If TRUE and pi0.method = "smoother", pi_0 will be
estimated by applying a smoother to a scatterplot of log(pi_0) estimates
against the tuning parameter lambda. Optional.
...
Arguments passed from qvalue function.
Details
If no options are selected, then the method used to estimate pi_0 is
the smoother method described in Storey and Tibshirani (2003). The
bootstrap method is described in Storey, Taylor & Siegmund (2004). A closed form solution of the
bootstrap method is used in the package and is significantly faster.
Value
Returns a list:
pi0
A numeric that is the estimated proportion
of true null p-values.
pi0.lambda
A vector of the proportion of null
values at the lambda values (see vignette).
lambda
A vector of lambda value(s) utilized in calculating pi0.lambda.
pi0.smooth
A vector of fitted values from the
smoother fit to the pi_0 estimates at each lambda value
(pi0.method="bootstrap" returns NULL).
Storey JD and Tibshirani R. (2003) Statistical significance for
genome-wide experiments. Proceedings of the National Academy of Sciences,
100: 9440-9445.
Storey JD, Taylor JE, and Siegmund D. (2004) Strong control,
conservative point estimation, and simultaneous conservative
consistency of false discovery rates: A unified approach. Journal of
the Royal Statistical Society, Series B, 66: 187-205. http://onlinelibrary.wiley.com/doi/10.1111/j.1467-9868.2004.00439.x/abstract
# import data
data(hedenfalk)
p <- hedenfalk$p
# proportion of null p-values
nullRatio <- pi0est(p)
nullRatioS <- pi0est(p, lambda=seq(0.40, 0.95, 0.05), smooth.log.pi0="TRUE")
nullRatioM <- pi0est(p, pi0.method="bootstrap")
# check behavior of estimate over lambda
# also, pi0est arguments can be passed to qvalue
qobj = qvalue(p, lambda=seq(0.05, 0.95, 0.1), smooth.log.pi0="TRUE")
hist(qobj)
plot(qobj)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(qvalue)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/qvalue/pi0est.Rd_%03d_medium.png", width=480, height=480)
> ### Name: pi0est
> ### Title: Proportion of true null p-values
> ### Aliases: pi0est
> ### Keywords: nulls pi0est, proportion true
>
> ### ** Examples
>
> # import data
> data(hedenfalk)
> p <- hedenfalk$p
>
> # proportion of null p-values
> nullRatio <- pi0est(p)
> nullRatioS <- pi0est(p, lambda=seq(0.40, 0.95, 0.05), smooth.log.pi0="TRUE")
> nullRatioM <- pi0est(p, pi0.method="bootstrap")
>
> # check behavior of estimate over lambda
> # also, pi0est arguments can be passed to qvalue
> qobj = qvalue(p, lambda=seq(0.05, 0.95, 0.1), smooth.log.pi0="TRUE")
> hist(qobj)
> plot(qobj)
>
>
>
>
>
>
> dev.off()
null device
1
>