Description Usage Arguments Value Author(s) References Examples
The function for calculating the original available p-values and all attaianble p-values for the corresponding hypothesis.
1 | 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 p).
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 χ^2 from Contingency Tables, and the Calculation of P. Journal of the Royal Statistical Society, 85: 87-94.
1 2 3 4 5 6 7 8 9 10 | ## 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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.