Learn R Programming

broman (version 0.68-2)

qqline2: qqline for qqplot

Description

Adds a line to a quantile-quantile plot for two datasets, from stats[qqplot]. (The available qqline function works mainly for qqnorm, with one sample being theoretical quantiles.)

Usage

qqline2(x, y, probs = c(0.25, 0.75), qtype = 7, ...)

Arguments

x

The first sample

y

The second sample.

probs

numeric vector of length two, representing probabilities. Corresponding quantile pairs define the line drawn.

qtype

the type of quantile computation used in quantile.

...

graphical parameters.

Value

Intercept and slope of the line.

See Also

qqline, qqplot

Examples

Run this code
# NOT RUN {
x <- rchisq(500, 3)
y <- rgamma(730, 3, 1/2)
qqplot(x, y)
qqline2(x, y)

# }

Run the code above in your browser using DataLab