plotDistr {hint} | R Documentation |
plotDistr
Description
Plot a distribution or visualise the result of a hypothesis test.
Usage
plotDistr(
distr,
col = "black",
test.col = "red",
xlim = NULL,
ylim = NULL,
xlab = "Intersection size (v)",
ylab = "Probability",
add = FALSE,
...
)
Arguments
distr |
A data frame or matrix in which the first column gives random variable values, and the second gives probabilities. Can also be a vector (in which case random variables of 0:length(distr) will be automatically assigned, or an object of class hint.test. |
col |
A character string naming the colour to use for the distribution. Defaults to "black". |
test.col |
A character string naming the colour to use for the region in which the cumulative probability of the hypothesis test was derived (if it exists). Defaults to "red". |
xlim |
A vector of two numbers giving the range for the x-axis. If NULL (default), then this is determined by the maximum and minimum values in distr. |
ylim |
A vector of two numbers giving the range for the y-axis. If NULL (default), then this is determined by the maximum and minimum values in distr. |
xlab |
A character string giving a label for the x-axis. Deafults to "Intersection size (v)". |
ylab |
A character string giving a label for the y-axis. Deafults to "Probability". |
add |
Logical. Whether the plot will be added to an existing plot or not. Defaults to FALSE. |
... |
Additional arguments to be passed to plot. |
Details
Visualising the results of a hypothesis test may often be of interest, but can be especially useful for pedagogical purposes.
Value
Plots to the current device.