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 <n.j.cox@durham.ac.uk>
To   statalist@hsphsun2.harvard.edu
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.)

Nick
n.j.cox@durham.ac.uk

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:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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