How to customize qqplot()?
The advantage of using `qqplot()` over `qqPlot()` is that we have more control over how to customize our plot. We can use any argument that works with `par()` or `plot()`, such as changing colors (`col`), symbols (`pch`), sizes (`cex`), labels (`xlab`, `ylab`, etc.), limits (`xlim`, ylim`) and so on. For example:
R
x <- rnorm (100) z <- qnorm ( ppoints (x)) # customize plot qqplot (z,x, col = "blue" , pch = 16, cex = 1.5, xlab = "Normal Quantiles" , ylab = "Sample Quantiles" , main = "QQ Plot" , xlim = c (-3.5, 3.5), ylim = c (-3.5, 3.5)) abline (0,1, col = "red" , lwd = 2, lty = 2) |
Output:
We can see that we have changed several aspects of our plot according to our preferences.
How to use qqplot() instead of qqPlot() in car package?
In this article, we will explain how to use the base R function ‘qqplot()’ instead of the ‘qqPlot()’ function from the `car` package to check the normality of a variable or a set of residuals. I will also show how to customize the plot and add confidence envelopes.
Contact Us