Library: | graphic |
See also: | grqqn grqqu grppn grppu |
Quantlet: | grqq | |
Description: | generates a quantile-quantile plot to compare the distributions of two variables. |
Usage: | dp = grqq(y, x {, col}) | |
Input: | ||
y | n x 1 vector, sample from the first variable | |
x | n x 1 vector, sample from the second variable | |
col | optional scalar, color of the plot; default col = grc.col.black | |
Output: | ||
dp | list, composed graphical object |
; loads the library graphic library("graphic") ; generates a dataset with 160 observations t1 =(normal(25)-8)|(normal(25)+8)|normal(100)|(normal(10)+25) t2 =(normal(25)-8)|(normal(25)+8)|normal(100)|(normal(10)+25) ; generates plot to compare t1 with t2 dp = grqq(t1, t2) ; creates a display and plots the graphic d = createdisplay(1,1) show(d, 1, 1, dp)
Shows a qq-plot