Learn R Programming

StMoSim (version 3.1.1)

qqnormSim: Quantile-Quantile plot with several Gaussian simulations.

Description

Plots a QQ plot of the variable x with nSim Gaussian simulations.

Usage

qqnormSim(x, nSim = 500, mOfVar = "mad",
  main = "Normal Q-Q Plot - SIM", xlab = "Theoretical Quantiles",
  ylab = "Sample Quantiles", qqnormCol = "black", qqnormPch = 1,
  qqlineCol = "#cdd2d015", qqlineLwd = 3)

# S4 method for lm qqnormSim(x, nSim = 500, mOfVar = "mad", main = "Normal Q-Q Plot - SIM", xlab = "Theoretical Quantiles", ylab = "Sample Quantiles", qqnormCol = "black", qqnormPch = 1, qqlineCol = "#cdd2d015", qqlineLwd = 3)

# S4 method for numeric qqnormSim(x, nSim = 500, mOfVar = "mad", main = "Normal Q-Q Plot - SIM", xlab = "Theoretical Quantiles", ylab = "Sample Quantiles", qqnormCol = "black", qqnormPch = 1, qqlineCol = "#cdd2d015", qqlineLwd = 3)

Value

invisible(NULL)

Arguments

x

a lm-object or a numeric vector. If it's a lm-object its residuals are plotted.

nSim

[optional] the number of simulations you like to add to the plot.

mOfVar

[optinal] a measure of variation. ("mad" or "sd")

main

[optional] an overall title for the plot.

xlab

[optional] a title for the x axis.

ylab

[optional] a title for the y axis.

qqnormCol

[optional] color of the obervations in the plot.

qqnormPch

[optional] point character of the observations in the plot.

qqlineCol

[optional] color of the simulations in the plot.

qqlineLwd

[optional] line width of the simulations. should not be higher than 3.

Author

Matthias Salvisberg <matthias.salvisberg@gmail.com>

Details

Two estimators are required for the simulation of the normal distribution. Since the normal distribution is a two-parameter family distribution. Default measure of location is the mean. Default measure of variation is the mad. This gives a robust estimation of the standard deviation even if there are outliers in the sample. Likewise this can be changed with the parameter mOfVar.

See Also

the basic graph corresponds to qqnorm