graph {PoweR} | R Documentation |
p-value plot, p-value discrepancy plot and size-power curves.
Description
This function draws a p
-value plot, a p
-value discrepancy plot or a
size-power curves plot.
Usage
graph(matrix.pval, xi = c(seq(0.001, 0.009, by = 0.001),
seq(0.01, 0.985, by = 0.005), seq(0.99, 0.999, by = 0.001)),
type = c("pvalue.plot", "pvalue.discrepancy", "size.power"),
center = FALSE, scale = FALSE)
Arguments
matrix.pval |
a matrix of |
xi |
a vector of values at which to compute the empirical distribution of
the |
type |
character. Indicate the type of plot desired. |
center |
Logical. Should we center the data generated |
scale |
Logical. Should we center the data generated |
Details
See Section 2.3 in Lafaye de Micheaux, P. and Tran, V. A. (2014).
Value
No return value. Displays a graph.
Author(s)
P. Lafaye de Micheaux, V. A. Tran
References
Pierre Lafaye de Micheaux, Viet Anh Tran (2016). PoweR: A Reproducible Research Tool to Ease Monte Carlo Power Simulation Studies for Goodness-of-fit Tests in R. Journal of Statistical Software, 69(3), 1–42. doi:10.18637/jss.v069.i03
See Also
See plot.pvalue
, plot.discrepancy
, plot.sizepower
.
Examples
stind <- c(43, 44, 42) # Indices of test statistics.
alter <-list(stat43 = 3, stat44 = 3, stat42 = 3) # Type for each test.
# Several p-values computed under the null.
# You can increase the values of M and N for better results.
matrix.pval <- many.pval(stat.indices = stind, law.index = 1,
n = 100, M = 10, N = 10, alter = alter, null.dist = 1,
method = "direct")
graph(matrix.pval)