Learn R Programming

animation (version 2.7)

sim.qqnorm: Simulation of QQ plots for the Normal distribution

Description

This demo shows the possible QQ plots created by random numbers generated from a Normal distribution so that users can get a rough idea about how QQ plots really look like.

Usage

sim.qqnorm(n = 20, last.plot = NULL, ...)

Arguments

n

integer: sample size

last.plot

an expression to be evaluated after the plot is drawn, e.g. expression(abline(0, 1)) to add the diagonal line

...

other arguments passed to qqnorm

Value

NULL

Details

When the sample size is small, it is hard to get a correct inference about the distribution of data from a QQ plot. Even if the sample size is large, usually there are outliers far away from the straight line. Therefore, don't overinterpret the QQ plots.

References

Examples at https://yihui.org/animation/example/sim-qqnorm/

See Also

qqnorm