Quantile-Quantile (QQ) Plot

Econometrics questions and discussions
ac_1
Posts: 495
Joined: Thu Apr 15, 2010 6:30 am

Quantile-Quantile (QQ) Plot

Unread post by ac_1 »

A simple question: is there a QQ-plot graphical procedure in RATS i.e. quantiles (fractiles) of sample data may be compared graphically against quantiles of a base (normal, t, etc) distribution ?
IRJ
Posts: 48
Joined: Wed Jan 10, 2007 1:15 am

Re: Quantile-Quantile (QQ) Plot

Unread post by IRJ »

The QPLOT procedure (QPLOT.src) does a QQ plot (it allows for a normal or exponential distribution).
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: Quantile-Quantile (QQ) Plot

Unread post by TomDoan »

ac_1 wrote:A simple question: is there a QQ-plot graphical procedure in RATS i.e. quantiles (fractiles) of sample data may be compared graphically against quantiles of a base (normal, t, etc) distribution ?
What you're describing isn't a QQ plot but a Q plot, which, as was pointed out can be done with @QPLOT. QQ is a plot of two sample quantiles against each other on a scatter plot. If they're from the same distribution, the points should lie roughly on the y=x line. It's actually just a scattergram of sorted versions of the two series.

Code: Select all

all 200
set test1 = %ran(1.5)
set test2 = %ran(1.0)
*
*  Q-Q plot
*
set x2 = test2
set x1 = test1
order x2
order x1
scatter(lines=||0.0,1.0||)
# x1 x2
Post Reply