plot.qqline: Add Line Going Through the Quantiles of a Q-Q Plot

Description Usage Arguments See Also Examples

Description

This function adds a line to a quantile-quantile plot which passes through user defined quantiles. This function is similar to, but more general than, qqline because the reference distribution need not be the standard normal distribution and the quantiles need not be the first and third quartiles.
Graphical parameters may be given as arguments to plot.qqline.

Usage

1
plot.qqline(x, y, a=0.25, ...)

Arguments

x

the reference (first) sample for the Q-Q plot, for a normal Q-Q plot this would be the quantiles of a N(0,1) random sample.

y

the data.

a

a number between 0 and 1. A line is drawn which connects the a and 1-a quantile points. The default line passes through the first and third quantiles.

...

graphical parameters may also be supplied as arguments to the function (see par).

See Also

qqplot, qqnorm, qqline.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data(MouseArray)
# mouse.setup <- init.grid()
# mouse.data <- init.data() ## see \emph{init.data}
# mouse.lratio <- stat.ma(mouse.data, mouse.setup)

## Calculation of t-statistics
## cl <- c(rep(1,3), rep(2,3))
## mouse.t2 <- stat.t2(mouse.lratio, cl)

## Diagnostic plots
plot.qq(mouse.t2$t, "Mouse")

## Using the QQline function
q <- quantile(rnorm(1000))
plot.qqline(q, mouse.t2$t)

gnyamundanda/sma documentation built on May 3, 2019, 5:17 p.m.