Learn R Programming

lattice (version 0.11-8)

qqmath: Q-Q Plot with Theoretical Distribution

Description

Quantile-Quantile plot of a sample and a theoretical distribution

Usage

qqmath(formula, distribution = qnorm, f.value = NULL, ...)

Arguments

Value

An object of class ``trellis''. The `update' method can be used to update components of the object and the `print' method (usually called by default) will plot it on an appropriate plotting device.

synopsis

qqmath(formula, data = parent.frame(), allow.multiple = FALSE, outer = TRUE, auto.key = FALSE, aspect = "fill", panel = "panel.qqmath", prepanel = NULL, scales = list(), strip = TRUE, groups = NULL, xlab, xlim, ylab, ylim, f.value = NULL, distribution = qnorm, drop.unused.levels, ..., default.scales, subscripts = !is.null(groups), subset = TRUE)

Details

qqmath produces a Q-Q plot of the given sample and a theoretical distribution. The default behaviour of qqmath is different from the corresponding S-PLUS function, but is similar to qqnorm. See the entry for f.value for specifics.

This and all other high level Trellis functions have several arguments in common. These are extensively documented only in the help page for xyplot, which should be consulted to learn more detailed usage.

See Also

xyplot, panel.qqmath, panel.qqmathline, prepanel.qqmathline, Lattice, quantile

Examples

Run this code
qqmath(~ rnorm(100), distribution = function(p) qt(p, df = 10))
qqmath(~ height | voice.part, aspect = 1, data = singer,
       prepanel = prepanel.qqmathline,
       panel = function(x, y) {
          panel.qqmathline(y, distribution = qnorm)
          panel.qqmath(x, y)
       })

Run the code above in your browser using DataLab