repl.txt (2235B)
1 2 {{alias}}( pvals, method[, comparisons] ) 3 Adjusts supplied p-values for multiple comparisons via a specified method. 4 5 The `method` parameter can be one of the following values: 6 7 - **bh**: Benjamini-Hochberg procedure controlling the False Discovery 8 Rate (FDR). 9 - **bonferroni**: Bonferroni correction fixing the family-wise error rate 10 by multiplying the p-values with the number of comparisons. The Bonferroni 11 correction is usually a too conservative adjustment compared to the others. 12 - **by**: Procedure by Benjamini & Yekutieli for controlling the False 13 Discovery Rate (FDR) under dependence. 14 - **holm**: Hommel's method controlling family-wise error rate. It is 15 uniformly more powerful than the Bonferroni correction. 16 - **hommel**: Hommel's method, which is valid when hypothesis tests are 17 independent. It is more expensive to compute than the other methods. 18 19 By default, the number of comparisons for which the p-values should be 20 corrected is equal to the number of provided p-values. Alternatively, it is 21 possible to set `comparisons` to a number greater than the length of 22 `pvals`. In that case, the methods assume `comparisons - pvals.length` 23 unobserved p-values that are greater than all observed p-values (for Holm's 24 method and the Bonferroni correction) or equal to `1` for the remaining 25 methods. 26 27 Parameters 28 ---------- 29 pvals: Array<number> 30 P-values to be adjusted. 31 32 method: string 33 Correction method. 34 35 comparisons: integer (optional) 36 Number of comparisons. Default value: `pvals.length`. 37 38 Returns 39 ------- 40 out: Array<number> 41 Array containing the corrected p-values. 42 43 Examples 44 -------- 45 > var pvalues = [ 0.008, 0.03, 0.123, 0.6, 0.2 ]; 46 > var out = {{alias}}( pvalues, 'bh' ) 47 [ 0.04, 0.075, ~0.205, 0.6, 0.25 ] 48 49 > out = {{alias}}( pvalues, 'bonferroni' ) 50 [ 0.04, 0.15, 0.615, 1.0, 1.0 ] 51 52 > out = {{alias}}( pvalues, 'by' ) 53 [ ~0.457, ~0.856, 1.0, 1.0, 1.0 ] 54 55 > out = {{alias}}( pvalues, 'holm' ) 56 [ 0.2, 0.6, 1.0, 1.0, 1.0 ] 57 58 > out = {{alias}}( pvalues, 'hommel' ) 59 [ 0.16, 0.6, 1.0, 1.0, 1.0 ] 60 61 See Also 62 -------- 63