F_1_panel.qqmath {lattice}R Documentation

Default Panel and Prepanel Function for qqmath

Description

This is the default panel function for qqmath.

Usage

panel.qqmath(x, f.value = NULL,
             distribution = qnorm,
             qtype = 7,
             groups = NULL, ...,
             tails.n = 0)

Arguments

x vector (typically numeric, coerced if not) of data values to be used in the panel.
f.value, distribution Defines how quantiles are calculated. See qqmath for details.
qtype The type argument to be used in quantile
groups An optional grouping variable. Within each panel, one Q-Q plot is produced for every level of this grouping variable, differentiated by different graphical parameters.
... further arguments, often graphical parameters.
tails.n number of data points to represent exactly on each tail of the distribution. This reproduces the effect of f.value = NULL for the extreme data values, while approximating the remaining data. It has no effect if f.value = NULL. If tails.n is given, qtype is forced to be 1.

Details

Creates a Q-Q plot of the data and the theoretical distribution given by distribution. Note that most of the arguments controlling the display can be supplied directly to the high-level qqmath call.

Author(s)

Deepayan Sarkar Deepayan.Sarkar@R-project.org

See Also

qqmath

Examples

set.seed(0)
xx <- rt(10000, df = 10)
qqmath(~ xx, type = c("b", "g"), pch = "+", distribution = qnorm,
  main = c("raw", "ppoints(100)", "tails.n = 50"),
  panel = function(..., f.value) {
    switch(panel.number(),
      panel.qqmath(..., f.value = NULL),
      panel.qqmath(..., f.value = ppoints(100)),
      panel.qqmath(..., f.value = ppoints(100), tails.n = 50))
  }, layout = c(3, 1))[c(1,1,1)]

[Package lattice version 0.18-5 Index]