estimatePower {PowerExplorer} | R Documentation

## Estimate Power of the Actual Data

### Description

Estimate power of comparison between each two groups based on the data simulated from estimated normal distributions of entrys in the entire dataset

### Usage

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

### Arguments

`inputObject` | a numeric raw data matrix or SummarizedExperiment object
`groupVec` | a vector indicating the grouping of samples
`isLogTransformed` | logical; set to `TRUE`, if the input data is log transformed.
`dataType` | "RNASeq" or "Proteomics" indictes the data type of the input data matrix.
`minLFC` | the threshold for log2 fold change, entrys with lower LFC are not included in the power calculation, set to 0 if no threshold is needed.
`alpha` | controlled false positive rate.
`ST` | the number of simulations of abundance data generation and repeated times of statistical test for each entry (>=100 recommended).
`seed` | an integer seed for the random number generator.
`enableROTS` | logical; if `TRUE`, Reproducibility-Optimized Test Statistic (ROTS) will be used as the statistical model. used as the statistical model.
`paraROTS` | a `list` object containing addtional parameters passed to ROTS (if enabled), see `ROTS`.
`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"
`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`.

### Value

a list of power estimates grouped in comparisons between each two groups

### See Also

`predictPower` predict power with incresing sample sizes

### Examples

    # Example 1: a random generated Proteomics dataset (10 DE, 100 non-DE)
    # Note: Simulation times(ST) is specified as 10 for shorter example runtime,
    # ST > 50 is recommended
    data(exampleProteomicsData)
    dataMatrix <- exampleProteomicsData$dataMatrix
    groupVec <- exampleProteomicsData$groupVec

    # Run estimation without LFC filtration
    resObject <- estimatePower(dataMatrix, groupVec,
                               dataType="Proteomics",
                               isLogTransformed=FALSE,
                               minLFC=0, alpha=0.05,
                               ST=10, seed=123)

[Package PowerExplorer version 1.0.1 Index]