plot.htest: Plot p-Values against Sample Size

Description Usage Arguments Details Author(s) See Also Examples

Description

Method for plotting the p-values of test results on RVG frequency tables.

Usage

1
2
## S3 method for class 'rvgt.htest'
plot(x, alpha = 0.001, ...)

Arguments

x

an object of class "rvgt.htest" or a list of such objects.

alpha

significance level.

...

further graphical parameters.

Details

Plot common logarithm of p-values stored in an object of class "rvgt.htest" (i.e., p-values of tests on RVG frequency tables). The p-values are plotted against increasing sample size. The significance level alpha is marked by a red dashed line. This allows for visible inspection of test results.

Argument x must be an object of class "rvgt.htest" that contains information about the test and p-values. Such an object is created by rvgt.chisq or rvgt.Mtest.

Alternatively, when the method is called by its full name, plot.rvgt.htest, then the first argument x may also be a list of such objects. Then p-values for multiple experiments will be plotted in the same graph with different colors. Thus one can compare the power of different tests or the results for different generation methods.

Author(s)

Sougata Chaudhuri sgtchaudhuri@gmail.com, Josef Leydold josef.leydold@wu.ac.at

See Also

rvgt.chisq, rvgt.Mtest.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Create a frequency table for normal distribution and show histogram.
## Use a sample of size of 5 times 10^5 random variates.
table <- rvgt.ftable(n=1e5,rep=5, rdist=rnorm,qdist=qnorm, mean=1,sd=2)

## Perform a chi-square goodness-of-fit test and plot result
r1 <- rvgt.chisq(table)
plot(r1)

## Perform M-test
r2 <- rvgt.Mtest(table)
plot(r2)

## Create a plot that contains the results of both tests
plot.rvgt.htest(list(r1,r2))

rvgtest documentation built on May 1, 2019, 6:35 p.m.