![]() ![]() Main code forked/borrowed/ported from the excellent:įox, John (2007) car: Companion to Applied Regression The larger the departure from the reference line, the greater the evidence that the data set have come from a population with a different distribution. If the empirical data come from the population with the choosen distribution, the points should fall approximately along this reference line. A 45-degree reference line is also plotted. The empirical quantiles are plotted to the y-axis, and the x-axis contains the values of the theorical model. The magnification to be used for the main title relative to the current setting of 'cex'.Īny other passthru parameters to the distribution functionĪ Quantile-Quantile (QQ) plot is a scatter plot designed to compare the data to the theoretical distributions to visually determine if the observations are likely to have come from a known population. The magnification to be used for x- and y-axis labels relative to the current setting of 'cex' The magnification to be used for axis annotation relative to the current setting of 'cex' The magnification to be used for sizing the legend relative to the current setting of 'cex' Provides the color for drawing chart elements, such as the box lines, axis lines, etc. Specifying 'line = "none"' suppresses the line. '"quartiles"' to pass a line through the quartile-pairs, or '"robust"' for a robust-regression line the latter uses the 'rlm' function in the 'MASS' package. Vector of point labels for interactive point identification, or 'FALSE' for no labels.Ĭolor for points and lines the default is the second entry in the current color palette (see 'palette' and 'par'). Set the direction of axis labels, same as in plotĬonfidence level for point-wise confidence envelope, or 'FALSE' for no envelope. The normal distribution 't' for the t-distribution. Root name of comparison distribution - e.g., 'norm' for )Īn xts, vector, matrix, data frame, timeSeries or zoo object of asset returns Plot the return data against any theoretical distribution.Ĭhart.QQPlot(R, distribution = "norm", ylab = NULL, xlab = paste(distribution, "Quantiles"), main = NULL, las = par("las"), envelope = FALSE, labels = FALSE, col = c(1, 4), lwd = 2, pch = 1, cex = 1, line = c("quartiles", "robust", "none"), lor = "darkgray", cex.axis = 0.8, cex.legend = 0.8, cex.lab = 1, cex.main = 1. If all the points plotted on the graph perfectly lies on a straight line then we can clearly say that this distribution is Normally distribution because it is evenly aligned with the standard normal variate which is the simple concept of Q-Q plot.R: Plot a QQ chart chart.QQPlot If the points at the ends of the curve formed from the points are not falling on a straight line but indeed are scattered significantly from the positions then we cannot conclude a relationship between the x and y axes which clearly signifies that our ordered values which we wanted to calculate are not Normally distributed. Now we have to focus on the ends of the straight line. Which gives a very beautiful and a smooth straight line like structure from each point plotted on the graph. We plot the theoretical quantiles or basically known as the standard normal variate (a normal distribution with mean=0 and standard deviation=1)on the x-axis and the ordered values for the random variable which we want to find whether it is Gaussian distributed or not, on the y-axis.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |