Learn R Programming

hint (version 0.1-0)

plot.hint.test: Plot hint.test Objects.

Description

This function visualises the results of a Hypergeometric Intersection test.

Usage

## S3 method for class 'hint.test':
plot(x, ...)

Arguments

x
An object of class hint.test.
...
Additional arguments to be passed to plot.

Value

  • Plots to the current device.

Details

Plots the relevant Hypergeometric Intersection distribution as a segment plot, and highlights the region where the observed statistic falls, i.e. the region from which the probability is computed (two.sided tests are visualised in one tail, the one with the smallest density). This can be especially useful for pedagogical purposes.

See Also

plotDistr, hint.test, hint.dist.test dhint.

Examples

Run this code
## Build hint.test object:
dd <- data.frame(letters[1:20], rep(1,10), rep(1,10))
tt <- hint.test(dd, letters[1:9], letters[7:15], alternative = "greater")

## Plot the distribution with the test region highlighted in red.
plot(tt, col = "blue")

Run the code above in your browser using DataLab