Learn R Programming

NostalgiR (version 1.0.2)

nos.qqplot: nos.qqplot text-based generic quantile-quantile plots

Description

Produces a text-based quantile-quantile plot between two equal size samples, with the option of plotting a line of theoretical quantile equality.

Usage

nos.qqplot(x, y, xlab = NULL, ylab = NULL, line = T, ratio = 0.25, width = round(options()$width * 0.8), height = round(ratio * width), pch = c("o", "~"))

Arguments

x
A numeric vector containing the values to be plotted along the x-axis. NA and NaN are allowed, but are removed for the plot. Infinities will cause an error.
y
A numeric vector containing the values to be plotted along the y-axis. NA and NaN are allowed, but are removed for the plot. Infinities will cause an error.
xlab
Label of the x-axis of the plot.
ylab
Label of the y-axis of the plot.
line
If TRUE, the line of theoretical quantile equality is plotted. If FALSE, then the line of theoretical quantile equality is not plotted.
ratio
Coefficient that controls the aspect ratio of the plot.
width
Width of the plot in points.
height
Height of the plot in points.
pch
A two dimensional vector of single-character symbols. The first symbol is for data point, and the second symbol is for the line of theoretical quantile equality.

See Also

qqplot, qqline, ppoints, and txtplot.

Examples

Run this code
## Produce a quantile-quantile plot between two samples of 10 random standard normal points,
## without the line of theoretical quantile equality.
x <- rnorm(10)
y <- rnorm(10)
nos.qqplot(x,y,line=FALSE)

## Produce a quantile-quantile plot of 100 random chi-squared(3) points against the
## true theoretical distribution, with the line of theoretical quantile equality.
y <- rchisq(100,3)
x <- qchisq(ppoints(100),3)
nos.qqplot(x,y,xlab='Theoretical Qs',ylab='Sample Qs')

Run the code above in your browser using DataLab