Description Usage Arguments Value Note Note Author(s) References Examples
Benjamini-Hochberg procedure adjusted p-values.
1 | c212.BH.adjust.pvals(trial.data)
|
trial.data |
File or data frame containing the p-values for the hypotheses being tested. The data must include a column called p which contains the p-values of the hypotheses. |
Returns the original data frame, ordered by p, with an additional column p_adj.
The adjusted p values may be directly compared to a value alpha to determine whether to declare a hypothesis significant under the Benjamini-Hochberg procedure at level alpha.
No check is made for duplicate rows in the input file or data frame.
R. Carragher<raymond.carragher@strath.ac.uk>
D. V. Mehrotra and J. F. Heyse (2004). Use of the false discovery rate for evaluating clinical safety data. Stat Methods Med Res, 13(3):227–38, 2004.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | trial.data <- data.frame(B = c(1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4),
j = c(1, 1, 2, 3, 4, 1, 2, 3, 4, 5, 6, 7, 1, 2, 3, 4, 5),
AE = c("AE1", "AE2", "AE3", "AE4", "AE5", "AE6", "AE7", "AE8", "AE9", "AE10", "AE11",
"AE12", "AE13", "AE14", "AE15", "AE16", "AE17"),
p = c(0.135005, 0.010000, 0.001000, 0.005000, 0.153501, 0.020000, 0.0013, 0.0023,
0.011, 0.023000, 0.016, 0.0109, 0.559111, 0.751986, 0.308339, 0.837154, 0.325882))
adj <- c212.BH.adjust.pvals(trial.data)
## Not run:
adj:
====
B j AE p p_adj
1 2 2 AE3 0.001000 0.01105000
2 3 2 AE7 0.001300 0.01105000
3 3 3 AE8 0.002300 0.01303333
4 2 3 AE4 0.005000 0.02125000
5 2 1 AE2 0.010000 0.02671429
6 3 7 AE12 0.010900 0.02671429
7 3 4 AE9 0.011000 0.02671429
8 3 6 AE11 0.016000 0.03400000
9 3 1 AE6 0.020000 0.03777778
10 3 5 AE10 0.023000 0.03910000
11 1 1 AE1 0.135005 0.20864409
12 2 4 AE5 0.153501 0.21745975
13 4 3 AE15 0.308339 0.39571386
14 4 5 AE17 0.325882 0.39571386
15 4 1 AE13 0.559111 0.63365913
16 4 2 AE14 0.751986 0.79898513
17 4 4 AE16 0.837154 0.83715400
## End(Not run)
adj[adj$p_adj <= 0.05, ]
## Not run:
B j AE p p_adj
1 2 2 AE3 0.0010 0.01105000
2 3 2 AE7 0.0013 0.01105000
3 3 3 AE8 0.0023 0.01303333
4 2 3 AE4 0.0050 0.02125000
5 2 1 AE2 0.0100 0.02671429
6 3 7 AE12 0.0109 0.02671429
7 3 4 AE9 0.0110 0.02671429
8 3 6 AE11 0.0160 0.03400000
9 3 1 AE6 0.0200 0.03777778
10 3 5 AE10 0.0230 0.03910000
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.