sampleSize {SSPA} | R Documentation |
The function sampleSize
initializes a SampleSize
-object. The density of effect-sizes is estimated using a deconvolution estimator or constrained optimization using B-splines.
sampleSize(PilotData, method = c("Langaas", "Storey", "Ferreira", "Ruppert", "Userdefined"), from = -6, to = 6, resolution = 2^10, kernel = c("fan", "wand", "sinc"), pi0 = seq(0.1, 0.99, 0.01), adjust=TRUE, nKnots = 11, bDegree = 3, ...)
PilotData |
object of class PilotData on which the sample size and power analysis will be performed |
method |
character string giving the method for estimation of the fraction of non-differentially expressed genes either one of:
|
from |
Lower bound of the density of effect-sizes (the range should be symmetric) |
to |
Upper bound of the density of effect-sizes. |
resolution |
the number of points on which the density of effect-sizes will be estimated (must be a power of 2) |
kernel |
the kernel type used in the deconvolution estimator either one of:
|
pi0 |
numeric or a vector of type numeric giving the fraction of non-differentially expressed genes. If method="Userdefined" a userdefined pi0 is obligated. If method="Ferreira" a range of values should be given e.g. seq(0.01, 0.99, 0.01) |
adjust |
is the density of effect sizes adjusted (adjust=TRUE , default) or not (adjust=FALSE ) |
nKnots |
number of knots used in Rupperts method for estimating the proportion of non-differentially expressed genes and density of effect-sizes |
bDegree |
degree of B-spline basis used in Rupperts method for estimating the proportion of non-differentially expressed genes and density of effect-sizes |
... |
Additional parameters for method for the estimation of the fraction of non-differentially expressed genes (Doesn't work yet!) |
The sampleSize
function performes the estimation of the proportion of non-differentially expressed genes using one of the three methods, "Langaas", "Storey", "Ferreira"
if method="Userdefined"
a userdefined pi0
is needed and estimation of the proportion of non-differentially expressed genes will be skipped. A deconvolution estimator is implemented using the Fast Fourier Transform Algorithm fft()
for estimations of the density of effect sizes.
If method="Ruppert"
constrained optimization using B-splines is used, for this method two additional packages needs to be installed namely quadprog
and splines
. Both the proportion of non-differentially expressed genes and the density of effect sizes are estimated with Ruppert's method. In contrast to the orginal method of Ruppert et al. (2007) we made a modification on the estimation of the density of effect sizes allowing for negative effect sizes as well.
Object of class SampleSize
Maarten van Iterson
Ferreira, F.A., Zwinderman, A., (2006). Approximate Power and Sample Size Calculations with Microarray Data: An Illustration. Statistical Applications in Genetics and Molecular Biology 5, (1).
Ferkingstad, E., Langaas, M., and Lindqvist, B. (2005). Estimating the proportion of true null hypotheses, with application to DNA microarray data. Journal of the Royal Statistical Society Series B, 67, 555-572.
Storey, J.D., (2002). A direct approach to false discovery rates. J.R. Statist. Med. 27, 1960-1972.
Ruppert, D. and Nettleton, D. and Hwang, J.T.G., (2007). Exploring the information in p-values for the analysis and planning of multiple-test experiments. Biometrics, 63, 2, 483-95.
convest
, qvalue
and SampleSize
use class?SampleSize
library(multtest) data(golub) teststat <- mt.teststat(golub, golub.cl) table(golub.cl) pd <- pilotData(name="golub", testStatistics=teststat, sampleSizeA=11, sampleSizeB=27) hist(pd) plot(pd) ss <- sampleSize(pd)