|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: twoway connected, by()- problem
The -if- condition needs to be applied globally. Compare:
sysuse auto, clear
twoway scatter head mpg if fore == 1 || ///
line gear mpg if fore == 1, by(rep) name(gr1,replace)
twoway scatter head mpg || ///
line gear mpg || ///
if fore == 1, by(rep) name(gr2,replace)
See also:
http://www.stata.com/statalist/archive/2003-05/msg00086.html
Scott
On 8/2/07, Cathy L. Antonakos <[email protected]> wrote:
> Dear Statalist,
>
> I have tried using the following code to produce an array of graphs for only the cases in a particular group.
>
>
> twoway connected walkwano hourx if w3grp_1==1 || ///
> line medianrate hourx if w3grp_1==1, by(resid)
>
> However, I get an array of graphs that includes blank graphs, for cases not in group 1.
>
> I can call the file, select the cases and run without the if commands. That produces what I need. But I have to repeat that step multiple times in order to get separate arrays (which I want) for each cluster of cases.
>
> I would like to use the "if" option successfully.
>
> Can someone help?
> Thank you.
>
> Cathy Antonakos
*
* 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/