The following code produces a quantile-quantile plot using R.
- You can use qqplot to produce a QQ plot of two datasets. This is comparison of two sample distributions - no comparison is being made to any theoretical distribution.
- In this example sample sizes are the same so there is no interpolation. If sample sizes differ, the values of the appropriate quantiles are interpolated.
- If sample sizes are different, equivalent quantiles to those in the smaller sample are interpolated in the larger sample.