plot.sizepower {PoweR} | R Documentation |
size-power curves.
Description
This function produces a size-power curves plot.
Usage
## S3 method for class 'sizepower'
plot(x, xnull,legend.pos=NULL,...)
Arguments
x |
|
xnull |
|
legend.pos |
If |
... |
further arguments passed to the |
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 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
, graph
.
Examples
## You can increase M for better results:
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.
pnull <- many.pval(stat.indices=stind,law.index=1,
n=100,M=100,N=10,alter=alter,null.dist=2,
method="MC")$pvals
Fxnull <- calcFx(pnull)
p <- many.pval(stat.indices=stind,law.index=4,n=100,
M=100,N=10,alter=alter,null.dist=2,
method="MC")$pvals
Fx <- calcFx(p)
plot.sizepower(Fx,Fxnull)