graph {PoweR} | R Documentation |
This function draws a p-value plot, a p-value discrepancy plot or a size-power curves plot.
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)
matrix.pval |
a matrix of p-values as returned by function |
xi |
a vector of values at which to compute the empirical distribution of the p-values. |
type |
character. Indicate the type of plot desired. |
center |
Logical. Should we center the data generated |
scale |
Logical. Should we center the data generated |
See Section 2.3 in Lafaye de Micheaux, P. and Tran, V. A. (2014).
P. Lafaye de Micheaux, V. A. Tran
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 plot.pvalue
, plot.discrepancy
, plot.sizepower
.
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)