Quantile-Quantile (QQ) Plot

Econometrics questions and discussions

Quantile-Quantile (QQ) Plot

Postby ac_1 » Sat Mar 31, 2012 4:33 am

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 ?
ac_1
 
Posts: 56
Joined: Thu Apr 15, 2010 6:30 am
Location: Surrey, England, UK

Re: Quantile-Quantile (QQ) Plot

Postby IRJ » Mon Apr 02, 2012 3:58 am

The QPLOT procedure (QPLOT.src) does a QQ plot (it allows for a normal or exponential distribution).
IRJ
 
Posts: 23
Joined: Wed Jan 10, 2007 2:15 am

Re: Quantile-Quantile (QQ) Plot

Postby TomDoan » Mon Apr 02, 2012 10:01 am

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
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to General Econometrics

Who is online

Users browsing this forum: No registered users and 3 guests

cron