Plots a QQ plot of the variable x with nSim Gaussian simulations.
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)
invisible(NULL)
a lm-object or a numeric vector. If it's a lm-object its residuals are plotted.
[optional] the number of simulations you like to add to the plot.
[optinal] a measure of variation. ("mad" or "sd")
[optional] an overall title for the plot.
[optional] a title for the x axis.
[optional] a title for the y axis.
[optional] color of the obervations in the plot.
[optional] point character of the observations in the plot.
[optional] color of the simulations in the plot.
[optional] line width of the simulations. should not be higher than 3.
Matthias Salvisberg <matthias.salvisberg@gmail.com>
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.
the basic graph corresponds to qqnorm