QQplot {DataVisualizations} | R Documentation |
QQplot with a Linear Fit
Description
Qantile-quantile plot with a linear fit
Usage
QQplot(X,Y,Type=8,NoQuantiles=10000,xlab, ylab,col="red",main='',
lwd=3,pch=20,subplot=FALSE,...)
Arguments
X |
[1:n] numerical vector, First Feature |
Y |
1:n] numerical vector, Second Feature to compare first feature with |
Type |
an integer between 1 and 9 selecting one of the nine quantile algorithms detailed in |
NoQuantiles |
number of quantiles used in QQ-plot, if number is low and the data has outliers, there may be empty space visible in the plot |
xlab |
x label, see |
ylab |
y label, see |
col |
color of line, see |
main |
title of plot, see |
lwd |
line width of plot, see |
pch |
type of point, see |
subplot |
FALSE: par is set specifically, TRUE: assumption is the usage as a subfigure, par has to be set by the user, no checks are performed, labels have to be set by the user |
... |
other parameters for |
Details
Output is the evaluation of a linear (regression) fit of lm
called 'line' and a quantile quantile plot (QQplot). Per default 10.000 quantiles are chosen, but in the case of very large data vectors one can reduce the quantiles for faster computation.
The 100 percentiles used for the regression line are of darker blue than the quantiles chosen by the user.
Value
List with
Quantiles |
[1:NoQuantiles,1:2] quantiles in y and y |
Residuals |
Output of the Regression with |
Summary |
Output of the Regression with |
Anova |
Output of the Regression with |
Author(s)
Michael Thrun
References
Michael, J. R.: The stabilized probability plot, Biometrika, Vol. 70(1), pp. 11-17, 1983.
Examples
data(MTY)
NormalDistribution=rnorm(50000)
QQplot(NormalDistribution,MTY)