Title: | Multiple Hypotheses Testing for Discrete Data |
---|---|
Description: | A comprehensive tool for almost all existing multiple testing methods for discrete data. The package also provides some novel multiple testing procedures controlling FWER/FDR for discrete data. Given discrete p-values and their domains, the [method].p.adjust function returns adjusted p-values, which can be used to compare with the nominal significant level alpha and make decisions. For users' convenience, the functions also provide the output option for printing decision rules. |
Authors: | Yalin Zhu, Wenge Guo |
Maintainer: | Yalin Zhu <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.0.0 |
Built: | 2024-11-13 02:42:34 UTC |
Source: | https://github.com/allenzhuaz/mhtdiscrete |
The function for calculating the original available p-values and all attaianble p-values for the corresponding hypothesis.
getPval(raw.data, test.type, alternative)
getPval(raw.data, test.type, alternative)
raw.data |
original data set with count number for treatment group and study group. The data set type could be |
test.type |
there are two discrete test available now, must be one of |
alternative |
indicates the alternative hypothesis and must be one of |
A numeric vector of the adjusted p-values (of the same length as ).
Yalin Zhu
Zhu, Y., & Guo, W. (2017). Familywise error rate controlling procedures for discrete data arXiv preprint arXiv:1711.08147.
Clopper, C. J. & Pearson, E. S. (1934). The use of confidence or fiducial limits illustrated in the case of the binomial. Biometrika, 26: 404-413.
Fisher, R. A. (1922).
On the Interpretation of from Contingency Tables, and the Calculation of P.
Journal of the Royal Statistical Society, 85: 87-94.
## Using Fisher's Exact Test to get the avaiable and attainablep-values # import raw data set as data.frame type df <- data.frame(X1=c(4, 2, 2, 13, 6, 8, 4, 0, 1), N1 = rep(148, 9), X2 = c(0, 0, 1, 3, 2, 1, 2, 2, 2), N2 = rep(132, 9)) # obtain the avaiable p-values and attainable p-values using two-sided Fisher's Exact Test getPval(raw.data=df, test.type = "FET",alternative = "two.sided") # store the avaiable p-values p <- getPval(raw.data=df, test.type = "FET",alternative = "two.sided")[[1]]; p # store the attainable p-values p.set <- getPval(raw.data=df, test.type = "FET",alternative = "two.sided")[[2]]; p.set
## Using Fisher's Exact Test to get the avaiable and attainablep-values # import raw data set as data.frame type df <- data.frame(X1=c(4, 2, 2, 13, 6, 8, 4, 0, 1), N1 = rep(148, 9), X2 = c(0, 0, 1, 3, 2, 1, 2, 2, 2), N2 = rep(132, 9)) # obtain the avaiable p-values and attainable p-values using two-sided Fisher's Exact Test getPval(raw.data=df, test.type = "FET",alternative = "two.sided") # store the avaiable p-values p <- getPval(raw.data=df, test.type = "FET",alternative = "two.sided")[[1]]; p # store the attainable p-values p.set <- getPval(raw.data=df, test.type = "FET",alternative = "two.sided")[[2]]; p.set
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
GTBH.p.adjust(p, p.set, alpha, make.decision)
GTBH.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Gilbert, P. B. (2005). A modified false discovery rate multiple-comparisons procedure for discrete data, applied to human immunodeficiency virus genetics. Journal of the Royal Statistical Society: Series C (Applied Statistics), 54: 143-158.
Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 57: 289-300.
GTBY.p.adjust
, MBH.p.adjust
, MBY.p.adjust
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) GTBH.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) GTBH.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
GTBY.p.adjust(p, p.set, alpha, make.decision)
GTBY.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Gilbert, P. B. (2005). A modified false discovery rate multiple-comparisons procedure for discrete data, applied to human immunodeficiency virus genetics. Journal of the Royal Statistical Society: Series C (Applied Statistics), 54: 143-158.
Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics, 29: 1165-1188.
GTBH.p.adjust
, MBH.p.adjust
, MBY.p.adjust
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) GTBY.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) GTBY.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
MBH.p.adjust(p, p.set, alpha, make.decision)
MBH.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 57: 289-300.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBH.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBH.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
MBL.p.adjust(p, p.set, alpha, make.decision)
MBL.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
The MBL procedure for discrete data controls FDR under the specific dependence assumption where the joint distribution of statistics from true nulls are independent of the joint distribution of statistics from false nulls.
Yalin Zhu
Benjamini, Y., and Liu, W. (1999). A step-down multiple hypotheses testing procedure that controls the false discovery rate under independence. Journal of Statistical Planning and Inference, 82: 163-170.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBL.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBL.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values
MBonf.p.adjust(p, p.set, alpha, make.decision)
MBonf.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
) if make.decision = FALSE
, or a list including original p-values, adjusted p-values and decision rules if make.decision = TRUE
.
The attainable p-value refers to the element of domain set of p-value for the corresponding hypothesis. For continuous test statistics, the p-value under true null are uniform distributed in (0,1), thus the p-values are attainable everywhere between 0 and 1. But for discrete test statistics, the p-value can only take finite values bewtween 0 and 1, that is the attainable p-values for discrete case are finite and countable, so we can assign them in a finite list p.set
.
Yalin Zhu
Zhu, Y., & Guo, W. (2017). Familywise error rate controlling procedures for discrete data arXiv preprint arXiv:1711.08147.
Tarone.p.adjust
, MixBonf.p.adjust
, p.adjust
.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBonf.p.adjust(p,p.set) ## Compare with the traditional Bonferroni adjustment p.adjust(p,method = "bonferroni") ## Compare with the Tarone adjustment Tarone.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBonf.p.adjust(p,p.set) ## Compare with the traditional Bonferroni adjustment p.adjust(p,method = "bonferroni") ## Compare with the Tarone adjustment Tarone.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
MBY.p.adjust(p, p.set, alpha, make.decision)
MBY.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics, 29: 1165-1188.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBY.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MBY.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
MHoch.p.adjust(p, p.set, alpha, make.decision)
MHoch.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis.. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Zhu, Y., & Guo, W. (2017). Familywise error rate controlling procedures for discrete data arXiv preprint arXiv:1711.08147.
Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika, 75: 800-803.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MHoch.p.adjust(p,p.set) ## Compare with the traditional Hochberg adjustment p.adjust(p,method = "hochberg") ## Compare with the Roth adjustment Roth.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MHoch.p.adjust(p,p.set) ## Compare with the traditional Hochberg adjustment p.adjust(p,method = "hochberg") ## Compare with the Roth adjustment Roth.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
MHolm.p.adjust(p, p.set, alpha, make.decision)
MHolm.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Zhu, Y., & Guo, W. (2017). Familywise error rate controlling procedures for discrete data arXiv preprint arXiv:1711.08147.
Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6: 65-70.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MHolm.p.adjust(p,p.set) ## Compare with the traditional Holm adjustment p.adjust(p,method = "holm") ## Compare with the Tarone-Holm adjustment TH.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) MHolm.p.adjust(p,p.set) ## Compare with the traditional Holm adjustment p.adjust(p,method = "holm") ## Compare with the Tarone-Holm adjustment TH.p.adjust(p,p.set)
The MHTdiscrete package provides two categories of important functions for discrete data mutliple hypothese testing:
Single-step: MBonf.p.adjust, MixBonf.p.adjust, Tarone.p.adjust.
Step-down: MHolm.p.adjust, TH.p.adjust.
Step-up: MHoch.p.adjust, Roth.p.adjust .
Step-down: MBL.p.adjust.
Step-up: MBH.p.adjust, GTBH.p.adjust, MBY.p.adjust, GTBY.p.adjust.
Yalin Zhu
Tarone, R. E. (1990). A modified Bonferroni method for discrete data. Biometrics, 46: 515-522.
Hommel, G., & Krummenauer, F. (1998). Improvements and modifications of Tarone's multiple test procedure for discrete data. Biometrics, 54: 673-681.
Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6: 65-70.
Roth, A. J. (1999). Multiple comparison procedures for discrete test statistics. Journal of statistical planning and inference, 82: 101-117.
Gilbert, P. B. (2005). A modified false discovery rate multiple-comparisons procedure for discrete data, applied to human immunodeficiency virus genetics. Journal of the Royal Statistical Society: Series C (Applied Statistics), 54: 143-158.
Benjamini, Y., and Hochberg, Y. (1995). Controlling the false discovery rate: a practical and powerful approach to multiple testing. Journal of the Royal Statistical Society Series B, 57: 289-300.
Benjamini, Y., and Yekutieli, D. (2001). The control of the false discovery rate in multiple testing under dependency. Annals of Statistics, 29: 1165-1188.
Benjamini, Y., and Liu, W. (1999). A step-down multiple hypotheses testing procedure that controls the false discovery rate under independence. Journal of Statistical Planning and Inference, 82: 163-170.
The function for calculating the adjusted p-values based on original available p-values and the attaianble p-values for the discrete test statistics.
MixBonf.p.adjust(pc, pd, pd.set, alpha, make.decision)
MixBonf.p.adjust(pc, pd, pd.set, alpha, make.decision)
pc |
numeric vector of the available p-values (possibly with |
pd |
numeric vector of the available p-values (possibly with |
pd.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis for discrete data. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
) if make.decision = FALSE
, or a list including original p-values, adjusted p-values and decision rules if make.decision = TRUE
.
The arguments include three parts, the available p-values need to be reorganized in advance. Gather all available p-values for continuous data as pc
, and all available p-values for discrete data as pd
. The attainable p-value refers to the element of domain set of p-value for the corresponding hypothesis for discrete test statistics, the p-value can only take finite values bewtween 0 and 1, that is, the attainable p-values for discrete case are finite and countable, so we can assign them in a finite list pd.set
. The function returns the adjusted p-values with the first part for continuous data of the same length as pc
, and second part for discrete data of the same length as pd
Yalin Zhu
Zhu, Y., & Guo, W. (2017). Familywise error rate controlling procedures for discrete data arXiv preprint arXiv:1711.08147.
Tarone.p.adjust
, MBonf.p.adjust
, p.adjust
.
pd <- c(pbinom(1,8,0.5),pbinom(1,5,0.75)); pc <- c(0.04, 0.1) pd.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75)) MixBonf.p.adjust(pc,pd,pd.set) ## Compare with the traditional Bonferroni adjustment p.adjust(c(pc,pd),method = "bonferroni")
pd <- c(pbinom(1,8,0.5),pbinom(1,5,0.75)); pc <- c(0.04, 0.1) pd.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75)) MixBonf.p.adjust(pc,pd,pd.set) ## Compare with the traditional Bonferroni adjustment p.adjust(c(pc,pd),method = "bonferroni")
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
Roth.p.adjust(p, p.set, digits, alpha, make.decision)
Roth.p.adjust(p, p.set, digits, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis.. |
digits |
minimal number of significant digits for the adjusted p-values, the default value is 4, see |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Roth, A. J. (1999). Multiple comparison procedures for discrete test statistics. Journal of statistical planning and inference, 82: 101-117.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) Roth.p.adjust(p,p.set,digits=5)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) Roth.p.adjust(p,p.set,digits=5)
The function for calculating the number of rejected hypotheses (rejection region) based on original available p-values, all attaianble p-values and the given significant level.
Roth.rej(p,p.set,alpha)
Roth.rej(p,p.set,alpha)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis.. |
alpha |
the given significant level for Roth's procedure, the default value is 0.05. |
An integer value of the number of rejected hypotheses.
Yalin Zhu
Roth, A. J. (1999). Multiple comparison procedures for discrete test statistics. Journal of statistical planning and inference, 82: 101-117.
Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika, 75: 800-803.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) Roth.rej(p,p.set,0.05)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) Roth.rej(p,p.set,0.05)
The function for calculating the adjusted p-values based on original available p-values.
Sidak.p.adjust(p, alpha, make.decision)
Sidak.p.adjust(p, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
) if make.decision = FALSE
, or a list including original p-values, adjusted p-values and decision rules if make.decision = TRUE
.
Yalin Zhu
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) Sidak.p.adjust(p)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) Sidak.p.adjust(p)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
Tarone.p.adjust(p, p.set, alpha, make.decision)
Tarone.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
) if make.decision = FALSE
, or a list including original p-values, adjusted p-values and decision rules if make.decision = TRUE
.
Yalin Zhu
Tarone, R. E. (1990). A modified Bonferroni method for discrete data. Biometrics, 46: 515-522.
MBonf.p.adjust
, MixBonf.p.adjust
, p.adjust
.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) Tarone.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) Tarone.p.adjust(p,p.set)
The function for calculating the adjusted p-values based on original available p-values and all attaianble p-values.
TH.p.adjust(p, p.set, alpha, make.decision)
TH.p.adjust(p, p.set, alpha, make.decision)
p |
numeric vector of p-values (possibly with |
p.set |
a list of numeric vectors, where each vector is the vector of all attainable p-values containing the available p-value for the corresponding hypothesis. |
alpha |
significant level used to compare with adjusted p-values to make decisions, the default value is 0.05. |
make.decision |
logical; if |
A numeric vector of the adjusted p-values (of the same length as p
).
Yalin Zhu
Hommel, G., & Krummenauer, F. (1998). Improvements and modifications of Tarone's multiple test procedure for discrete data. Biometrics, 54: 673-681.
Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scandinavian Journal of Statistics, 6: 65-70.
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) TH.p.adjust(p,p.set)
p <- c(pbinom(1,8,0.5),pbinom(1,5,0.75),pbinom(1,6,0.6)) p.set <-list(pbinom(0:8,8,0.5),pbinom(0:5,5,0.75),pbinom(0:6,6,0.6)) TH.p.adjust(p,p.set)