chisq: Perform Chi-Square goodness-of-fit Test on RVG Frequency...

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

Description

Perform achi-square goodness-of-fit test on the RVG frequency table.

Usage

1

Arguments

ftable

object of class "rvgt.ftable".

Details

rvgt.chisq performs aa chi-square goodness-of-fit test on the bin counts of the RVG frequency tables created by means of rvgt.ftable. The null hypothesis is that the bin counts are distributed according to the expected probabilities (i.e., proportional to the lengths of the histogram cells).

If the ftable contains the bin counts for more than one repetitions then the test is repeated with column sums of increasing number of rows which corresponds to increasing sampling sizes. This allows for getting an idea of the power of the test.

Value

An object of class "rvgt.htest" which is a list with components:

type

character string containing type of test; equals "chisqu".

n

sample size for every row in ftable.

rep

number of rows in ftable.

breaks

number of break points in ftable (i.e., number of bins + 1).

pval

vector of p-values.

Author(s)

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

See Also

See plot.rvgt.htest for the syntax of the plotting method.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Create a frequency table for normal distribution and
## conduct a chi-square goodness-of-fit test on this data.
## 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 test
result <- rvgt.chisq(table)

## Plot result
plot(result)

Example output



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