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, statalist.org is already up and running.


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

st: qplot , over()


From   Keith Dear <keithdear4@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: qplot , over()
Date   Fri, 23 Mar 2012 23:22:28 +1100

How can I get several quantile plots in one diagram?
(There have been past threads on this, but I found no mention of what
I am getting.)

sysuse auto
replace mpg=mpg/2 if foreign   // for greater separation
qplot mpg, by(foreign)      // two distinct curves, which I would like
to plot together
qplot mpg, over(foreign)  // points on a single curve, not what I expected

Am I misunderstanding the help file? It seems to imply that by() and
over() give the same set of curves, which is what I want but isn't
what happens:

---- help qplot
by(varname[, suboptions]) specifies that calculations be carried out
separately for each distinct value of a
        specified single variable. Results will be shown separately in
distinct panels. See [G] by_option.
over(varname) specifies that calculations be carried out separately
for each distinct value of a specified
        single variable.  Curves will be shown together within the
same panel.  over() is only allowed with a single
        varname.
----

-qplot- is by NJC out of -net install gr42_5.pkg-


-- 
Dr Keith Dear
National Centre for Epidemiology and Population Health
ANU College of Medicine, Biology and Environment
Australian National University
Canberra, ACT 0200 Australia
Phone +61 (02) 6273 2208
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index