plot.ftable: Plot RVG Frequency Table

Description Usage Arguments Details Author(s) See Also Examples

Description

Method for plotting the density of an RVG frequency table.

Usage

1
2
## S3 method for class 'rvgt.ftable'
plot(x, rows, alpha = 0.01, ...)

Arguments

x

object of class "rvgt.ftable".

rows

integer or array of integers that indicate the rows of the table for which the density is plotted. If missing all rows are used.

alpha

significance level for plotting critical values.

...

further graphical parameters.

Details

plot creates a density plot for the given RVG frequency table. The display zooms into the union of the range of frequency values and 2 times the confidence intervals for the frequencies. Thus it visualizes significant deviations from the unifrom distributions. The critical values for significance level alpha are marked by a red (dashed) line.

rows is either a number or a vector of numbers that indicate the rows of RVG tabel x which are merged (cumulated) for the plot. If this argument is missing, all rows are merged.

Author(s)

Sougata Chaudhuri [email protected], Josef Leydold [email protected]

See Also

rvgt.ftable for creating the frequency table; hist for the height of the drawn rectangle.

Examples

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

## Plot histogram
plot(ft)

## Plot histogram for row 1 only
plot(ft,rows=1)

## Plot histogram for rows 2 and 4 only
plot(ft,rows=c(2,4))

## Same with the buggy random variate generator
## (try to increase sample size 'n' or 'rep')
RNGkind(normal.kind="Buggy Kinderman-Ramage")
ft <- rvgt.ftable(n=1e5,rep=1, rdist=rnorm,qdist=qnorm)
plot(ft)

rvgtest documentation built on May 29, 2017, 9:11 a.m.