predictPower {PowerExplorer} | R Documentation

## Estimate Power Under Increasing Sample Sizes

### Description

Simlilar to `estimatePower`, power estimations are performed under multiple increasing sample sizes

### Usage

    predictPower(inputObject, groupVec, isLogTransformed = FALSE,
      dataType = c("RNASeq", "Proteomics"), enableROTS = FALSE,
      paraROTS = list(B = 1000, K = NULL, paired = FALSE, a1 = NULL, a2 = NULL,
      progress = FALSE), minLFC = 0.5, rangeSimNumRep = NA, alpha = 0.05,
      ST = 100, seed = 123, parallel = FALSE, BPPARAM = bpparam(),
      showProcess = FALSE, saveResultData = FALSE)

### Arguments

`inputObject` | a numeric raw Proteomics abundance data matrix, in which rows correspond to proteins and columns correspond to samples.
`groupVec` | a vector indicating the grouping of samples
`isLogTransformed` | logical; logical; set to `TRUE`, if the input data is log transformed.
`dataType` | "RNASeq" or "Proteomics" indictes the data type of the input data matrix.
`enableROTS` | logical; if `TRUE`, Reproducibility-Optimized Test Statistic (ROTS) will be used as the statistical model.
`paraROTS` | a `list` object containing addtional parameters passed to ROTS (if enabled), see `ROTS`.
`minLFC` | LFC threshold
`rangeSimNumRep` | a vector of sample sizes under which power will be estimated
`alpha` | controlled false positive rate.
`ST` | the number of simulations of abundance data generation and repeated times of statistical test for each protein (>=100 recommended).
`seed` | an integer seed for the random number generator.
`parallel` | logical; if `FALSE` parallelization is disabled; if `TRUE`, parallelize calculations using `BiocParallel`.
`BPPARAM` | an optional argument object passed `bplapply` to indicate the registered cores, if `parallel=TRUE`.
`showProcess` | logical; if `TRUE`, show the detailed information of each simulation, used for debugging only.
`saveResultData` | logical; if `TRUE`, save the simulated data into RData with name pattern "simulated_Data_numRep_X_numSim_XXX_XXXXX.RData".

### Value

a list of power predictions for each sample size, grouped in comparisons between each two groups

### See Also

`estimatePower` estimate power based on actual data

### Examples

    # Example 1: a random generated Proteomics dataset (10 DE, 100 non-DE)
    data(exampleProteomicsData)
    dataMatrix <- exampleProteomicsData$dataMatrix
    groupVec <- exampleProteomicsData$groupVec

    # Run estimation
    # Note: Simulation times(ST) is specified as 5 for shorter example runtime
    #       For better performence, ST > 50 is recommended
    predictedPower <- predictPower(dataMatrix, groupVec,
                                   isLogTransformed=FALSE,
                                   dataType="Proteomics",
                                   minLFC=0,
                                   rangeSimNumRep=c(5, 10, 15),
                                   alpha=0.05, ST=5, seed=123)

[Package PowerExplorer version 1.0.1 Index]