Description Usage Arguments Note Author(s) See Also Examples
Produces a text-based quantile-quantile plot between two equal size samples, with the option of plotting a line of theoretical quantile equality.
1 2 3 |
x |
A numeric vector containing the values to be plotted along the x-axis. |
y |
A numeric vector containing the values to be plotted along the y-axis. |
xlab |
Label of the x-axis of the plot. |
ylab |
Label of the y-axis of the plot. |
line |
If |
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. |
Due to rounding to a relatively crude grid results can only be approximate. The equally spaced axis ticks, for example, may be non-equally spaced in the plot. Further, due to the crude grid also there might be several points per character. The function uses the same plotting symbol no matter how many points coincide on one character position.
Hien D. Nguyen
qqplot
, qqline
, ppoints
, and txtplot
.
1 2 3 4 5 6 7 8 9 10 11 | ## 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')
|
Loading required package: txtplot
+---------+---------+---------+--------+---------+----------+
| o |
2 + +
| |
| |
1 + o +
| o |
| o o |
| o |
0 + o +
| o |
| |
| |
-1 + o o +
+---------+---------+---------+--------+---------+----------+
-1 -0.5 0 0.5 1 1.5
+-+--------------------+--------------------+-------------+
| ~~~o |
| o o ~~~~~ |
S 10 + ~~~~~~ +
a | o o~~~~ |
m | o~~~~ |
p | oooo~ |
l | ooooooo~ |
e 5 + oo~~~ +
| ooooo~ |
Q | ooooo |
s | oooooo |
0 + oooo +
+-+--------------------+--------------------+-------------+
0 5 10
Theoretical Qs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.