Given a vector of pathway-level MiniMax statistics and a vector of Beta Distribution parameters, calculate the MiniMax statistics' p-values.

MiniMax_calculatePVal(MiniMax_num, betaParams_ls)

Arguments

MiniMax_num

A numeric vector of MiniMax statistics

betaParams_ls

A list of the parameters for the Beta Distribution. These values should be returned by the MiniMax_estBetaParams function.

Value

A vector of the MiniMax significance levels (p-values) corresponding to the supplied MiniMax statistics.

Examples

  # Find the best-fitting paramters based on the MiniMax statistic values
  #   under the null distribution
  mmBetaParams_ls <- MiniMax_estBetaParams(
    MiniMaxNull_num = nullMiniMaxResults_df$MiniMax,
    nPlatforms = 3L,
    method = "MoM"
  )

  # Calculate the MiniMax Statistics for each gene set
  mmVals_num <- MiniMax_calculateStatistic(
    res_df = multiOmicsHighSignalResults_df[, -(1:2)]
  )

  # Find the p-values corresponding to these statistics
  MiniMax_calculatePVal(
    MiniMax_num = mmVals_num,
    betaParams_ls = mmBetaParams_ls
 )
#>  [1] 0.869147528 0.807798221 0.803079930 0.000000000 0.000000000 0.791104570
#>  [7] 0.792313454 0.277915596 0.209891314 0.418006467 0.166657048 0.813636893
#> [13] 0.603610941 0.622411577 0.589034086 0.000000000 0.495652257 0.787463052
#> [19] 0.000000000 0.340193221 0.658007473 0.835202498 0.500135449 0.003932541
#> [25] 0.740822483 0.035610849 0.370750199 0.868134428 0.506110402 0.546307283
#> [31] 0.485186804 0.003029706 0.835202498 0.559629336 0.149160531 0.568482095
#> [37] 0.202257943 0.264177302 0.829624954 0.046588286 0.610863048 0.400207449
#> [43] 0.261451013 0.966033682 0.132352449 0.561106480 0.878120998 0.702261740
#> [49] 0.074753792 0.000000000