Learn R Programming

lattice (version 0.7-1)

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 = ppoints,...)

Arguments

formula
formula of the form ~ x | g1 * g2 * ..., where x must be a numeric.
distribution
a quantile function that takes a vector of probabilities as argument and produces the corresponding quantiles. Possible values are qnorm,qunif etc. Distributions with other required arguments need to be passed in as user defin
f.value
function of a single integer (representing sample size), returning a vector of probabilities corresponding to which quantiles should be plotted.
...
Other 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(), aspect = "fill", layout = NULL, panel = panel.qqmath, prepanel = NULL, scales = list(), strip = TRUE, groups = NULL, xlab, xlim, ylab, ylim, f.value = ppoints, distribution = qnorm, ..., subscripts = !is.null(groups), subset = TRUE)

Details

These 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

Examples

Run this code
qqmath(~ rnorm(100), distribution = function(p) qt(p, df = 10))
data(singer)
qqmath(~ height | voice.part, aspect = 1, data = singer)

Run the code above in your browser using DataLab