qqplot2: Quantile-Quantile Plots using arbitrary distributions.

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plotting.R

Description

Produces a QQ plot of the values in y against the theoretical quantiles of an arbitrary distribution.

Usage

1
2
qqplot2(y, fQuant = function(q, x) qnorm(q, mean(x, na.rm = TRUE), sd(x, na.rm = TRUE)),
line = TRUE, xlab = "Theoretical Quantiles", ...)

Arguments

y

the data sample.

fQuant

a function taking 2 arguments. The first argument is a vector of quantiles, the second is the data sample. This function returns theoretical quantile values.

line

logical. Should a line representing perfect fit be plotted?

xlab

xlab value.

...

additional arguments passed to qqplot.

Value

Nothing of interest.

Author(s)

Antoine Filipovic Pierucci

See Also

qqplot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
y1 <- rnorm(500)
y2 <- rlnorm(500)

# good fit
qqplot2(y1)
# bad fit
qqplot2(y2)

# defining a new fQuant function
fQuant2 <- function(q, x)
    qlnorm(q, mean(log(x)), sd(log(x)))

# better fit
qqplot2(y2, fQuant2)

Example output



rmngb documentation built on May 29, 2017, 9:22 p.m.

Related to qqplot2 in rmngb...