Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: CDF Differences

From   "Nick Cox" <>
To   <>
Subject   st: RE: CDF Differences
Date   Wed, 31 Mar 2010 17:52:21 +0100

This isn't a simple question at all, I think (feature!). 

-cdf- and -cdfplot- are user-written commands from the STB and SSC. The
FAQ advises at that you
should explain this for your question to be clear. (I had to use
-search-, -findit- and then read the help files for your question to
make full sense.) 

As far as I can see, neither command offers a generate option. To do
what you want to do, you need to calculate the distribution functions
yourself. But it's tricky: you would typically need to interpolate to
evaluate the difference at the same points in both cases. And I guess
you'd need to program the pointwise confidence bands for the differences

There are some concrete ideas in roughly the same territory at 

SJ-7-2  gr0027  . .  Stata tip 47: Quantile-quantile plots without
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q2/07   SJ 7(2):275--279                                 (no
        tip on producing various quantile-quantile (Q-Q) plots

My own bias, or one of them, is that quantile-quantile plots are more
illuminating for this kind of comparison. 

Also, see Roger Newson's work on packages like -somersd-. (Use -findit-
to find it.) 


Francesco Burchi

Mine is a rather simple question. I have plotted the "cumulative
distribution function" (CDF) for one variable (KNOWLEDGEINDEX) depending
whether the dummy variable RADIO takes value 0 or 1. I have used the
following commands:

or alternatively, 
cdfplot KNOWLEDGEINDEX, by(RADIO) norm  nocdf

Now, I would like to plot the differences in the CDF of KNOWLEDGEINDEX
RADIO with the pointwise confidence bands. In one sentence, I would like
have a graph with the KNOWLEDGEINDEX in the horizontal axis and the CDF
Difference in the vertical axis.

*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index