qq_plot_movie: Quantile-Quantile plot movie

View source: R/qq_plot_movie.R

qq_plot_movieR Documentation

Quantile-Quantile plot movie

Description

A movie to illustrate the constructions of a normal Quantile-Quantile (QQ) plot.

Usage

qq_plot_movie(data = NULL, mu = NULL, sigma = NULL)

Arguments

data

A numeric vector. Data on which to base the QQ plot.

mu, sigma

Numeric scalars. The mean and standard deviation of the normal distribution to which the data data are to be compared. If mu and/or sigma are not supplied then they are estimated from the data.

Details

This movie enables the user to scroll forwards and backwards through plots that describe the way in which a (normal) QQ plot is produced. This movie is designed for simple illustrative examples with small numbers of observations, that is, for small length(data). The example below has only 9 observations. In cases where there are many more observations than this the plots will be a bit of a mess!

Value

Nothing is returned, only the animation is produced.

See Also

stat0002movies: general information about the movies.

Examples

# Create the same dataset used in the lecture notes/slides
set.seed(382)
x <- sort(round(rnorm(9, mean = 7.72, sd = 3.57), 2))
qq_plot_movie(data = x, mu = 7.72, sigma = 3.57)

paulnorthrop/stat0002 documentation built on Oct. 10, 2024, 1:27 p.m.