Learn R Programming

astsa (version 2.2)

QQnorm: Normal Quantile-Quantile Plot

Description

Produces a normal QQ plot with a line of equality and a confidence band (by default) of the input data. This is basically a prettier version of qqnorm from the stats package.

Usage

QQnorm(xdata, col = c(4, 6), ylab = "Sample Quantiles", xlab = "Theoretical Quantiles", 
        main = "Normal Q-Q Plot", ylim = NULL, ci = TRUE, width.ci = 99.995, 
        qqlwd = 1, ...)

Arguments

xdata

the data. If a matrix, the data are collapsed.

col

vector of 2, first is point color, second is line color (default is blue-4 and magenta-6).

ylab

y-axis label (default is 'Sample Quantiles').

xlab

x-axis label (default is 'Theoretical Quantiles').

main

plot title (default is 'Normal Q-Q Plot')

ylim

limits on y-axis (default is the most beautiful limits ever).

ci

logical; if TRUE (default) draws pointwise CIs as a band.

width.ci

width of the CI in terms of percent (default is 99.995).

qqlwd

line width of the qqline (default is 1).

...

other graphical parameters sent to tsplot.

Author

D.S. Stoffer

Details

If you want a graphic to check normality of your data in xdata, just enter QQnorm(xdata) and sit back and enjoy the beauty of this script (you may want to wear sunglasses).

References

You can find demonstrations of astsa capabilities at FUN WITH ASTSA.

The most recent version of the package can be found at https://github.com/nickpoison/astsa/.

In addition, the News and ChangeLog files are at https://github.com/nickpoison/astsa/blob/master/NEWS.md.

The webpages for the texts and some help on using R for time series analysis can be found at https://nickpoison.github.io/.

Examples

Run this code

QQnorm(log(varve))

Run the code above in your browser using DataLab