plot.sizepower: size-power curves.

Description Usage Arguments Details Author(s) References See Also Examples

Description

This function produces a size-power curves plot.

Usage

1
2
## S3 method for class 'sizepower'
plot(x, xnull,legend.pos=NULL,...)

Arguments

x

Fx object as returned by function calcFx.

xnull

Fx object as returned by function calcFx, but computed under the null.

legend.pos

If NULL, position of the legend will be computed automatically. Otherwise, it should be either a character vector in "bottomright", "bottom", "bottomleft", "left", "topleft", "top", "topright", "right" and "center". Or a numeric vector of length 2 giving the x-y coordinates of the legend.

...

further arguments passed to the plot or points functions.

Details

See Section 2.3 in Lafaye de Micheaux, P. and Tran, V. A. (2014).

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## 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)

PoweR documentation built on May 2, 2019, 2:09 p.m.

Related to plot.sizepower in PoweR...