Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Superimposing graphs


From   [email protected]
To   [email protected]
Subject   Re: st: Superimposing graphs
Date   Thu, 10 Feb 2005 15:25:44 -0600

You seem to be mixing the ||-separator and ()-binding notation.

Try this:

twoway (scatter capture lngdpppp if year==1988 & group==1) /// 
(qfit capture lngdpppp if year==1988 & group==1) /// 
(scatter capture lngdpppp if year==1998 & group==1) /// 
(qfit capture lngdpppp if year==1998 & group==1)


Hope this helps,
Scott

----- Original Message -----
From: Branko Milanovic <[email protected]>
Date: Thursday, February 10, 2005 1:49 pm
Subject: st: Superimposing graphs

> I am trying to draw two very similar graphs in one figure. The 
> graph for
> year X should show dots for that year and fit a regression (qfit 
> or lfit
> I don't care). The graph for year Y should do exactly the same 
> thing and
> fit the regression for that year across that year's dots. Seems easy?
> 
> But while each of the graphs works fine separately, and while one of
> them works with both the dots and the line (as it should), the other
> shows only the dots or gives the message
> 
> 1| invalid name
> 
> So I cannot get both of them with dots and fits on the same 
> figure. Any
> idea why?  The text is given below.
> 
> Thanks a lot,
> 
> Branko Milanovic
> 
> 
> 
> twoway (scatter capture lngdpppp if year==1988 & group==1 || qfit
> capture lngdpppp if year==1988 & group==1)
> (scatter capture lngdpppp if year==1998 & group==1 || qfit capture
> lngdpppp if year==1998 & group==1)
> 
> Ps. "capture" is variable name.
> 


*
*   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