plot.qqline {sma}R Documentation

Add Line Going Through the Quantiles of a Q-Q Plot


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.


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


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.


# mouse.setup <- init.grid()
# <- ## see \emph{}
# mouse.lratio <-, 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)

[Package sma version 0.5.15 Index]