Statalist


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

Re: st: failure of by options with twoway scatter


From   "Alan Neustadtl" <[email protected]>
To   [email protected]
Subject   Re: st: failure of by options with twoway scatter
Date   Thu, 11 Oct 2007 15:21:27 -0400

It appears that you have a space in your command that is causing the
error.  You have a space between "by" and "(Group, total)"

The following should work.
twoway (scatter CEC week), by(Group, total) yscale(log)


As does this in an widely available dataset:
sysuse auto, clear
twoway (scatter mpg weight), by (foreign, total) yscale(log)

Best,
Alan



On 10/11/07, jwegelin <[email protected]> wrote:
> The following command works fine.
>
> twoway (scatter CEC week), by (Group) yscale(log)
>
> (Group takes on three values.) But when I attemmpt to add "by options" I
> get errors:
>
> . twoway (scatter CEC week), by (Group, total) yscale(log)
> ) required
> r(100);
>
> Also when I attempt to use the syntax in the Stata Release 10 Graphics
> manual (page 406), I get an error:
>
> . scatter CEC week, by (Group)
> option by() not allowed
> r(198);
>
> although the yscale option works.
>
> . scatter CEC week, yscale(log)
>
> I am using
>
> .  about
>
> Stata/MP 10.0 for Macintosh
> Born 25 Jul 2007
> Copyright (C) 1985-2007
>
> Thanks for any advice.
>
> Jacob A. Wegelin
> Assistant Professor
> Department of Biostatistics
> Virginia Commonwealth University
> 730 East Broad Street Room 3006
> P. O. Box 980032
> Richmond VA 23298-0032
> U.S.A.
> http://www.people.vcu.edu/~jwegelin
>
> *
> *   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/
>
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index