Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Kolmogorov-Smirnov, comparison cumulative fraction plots,

From   n j cox <>
Subject   Re: st: Kolmogorov-Smirnov, comparison cumulative fraction plots,
Date   Fri, 18 May 2007 18:07:00 +0100

Various programs exist that may be helpful here.

One is -cdfplot-, available from SSC. The latest
version is by Adrian Mander.

. findit cdfplot

Another is -distplot-, available from the Stata Journal
website. Yet another is -qplot-, ditto.

. search distplot
. search qplot

The latter searches will also point to discussions
in the Stata Journal and the Stata Technical Bulletin
of these programs and their uses.

For various reasons, my bias is towards the latter two,
although -cdfplot- does at least one thing, superimpose
a cumulative Gaussian (a.k.a. normal, central), that
neither of the others tries to do.

There is no direct connection between these graphics
programs and Kolmogorov-Smirnov testing. Although
ingenious answers to the questions they attack,
I find most empirical cumulative distribution plot tests
fairly useless in practice. There is a splendid quotation
from Rupert G. Miller somewhere in the manuals (I think
at [R] diagplots) that summarises many of the issues
very well. If you want a handle on
the underlying uncertainty, a much better technique
is to simulate a portfolio of pertinent distributions
as context and plot them too.

In this field, as your question implies, it is perhaps
more common to plot cumulative probability against
variable values than vice versa. Although in principle
the two possibilities convey the same information, in
practice plotting variable values (quantiles) as response
is often more effective. For that reason alone, I
commend -qplot-.

(In any case, you have multiple cumulatives to compare.)


Knag Anne-Christine

How can I make KS-test comparison cumulative fraction plots and comparison
percentile plots in Stata? I have size measuerments and outputs from nine
groups (collected every day over a period of time) which I want to compare.
*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index