Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

st: RE: CDF Differences


From   "Nick Cox" <[email protected]>
To   <[email protected]>
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 
http://www.stata.com/support/faqs/res/statalist.html#stata 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
yourself. 

There are some concrete ideas in roughly the same territory at 

SJ-7-2  gr0027  . .  Stata tip 47: Quantile-quantile plots without
programming
        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N.
J. Cox
        Q2/07   SJ 7(2):275--279                                 (no
commands)
        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.) 

Nick 
[email protected] 

Francesco Burchi

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

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

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


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index