Learn R Programming

lattice (version 0.3-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, py default plotted by print.trellis.

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)

See Also

trellis.args, 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