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

Re: st: generating one twoway graph using by


From   Daniel Egan <[email protected]>
To   [email protected]
Subject   Re: st: generating one twoway graph using by
Date   Fri, 24 Sep 2004 11:24:17 -0400

Thanks to Nick & Nick, 

Nick Cox's -linkplot-  is exactly what I was looking for.

Four notes:
1) Nick Cox noted that the tsset package was optimal only if my dates
were regularly spaced in time (which they are not).

2) I ran into the fact that -linkplot- cannot be used with -twoway-.
However, line yvar xvar, connect(L) does work with twoway.

3) Nick Winter skeptically said..." I'm not sure that plotting all 200
in one graph will generate anything comprehensible, but it can be done
. . ."

The full line is actually: 
tw (line ivalue idate, connect(L) ms(i) yline(2 3.5)) (sc maxivalue
idate, ms(i) mlabel(PID)) (sc minivalue idate, ms(i) mlabel(PID))

I am only really interested in when/by how much the values deviate
from the range of 2-3.5 (above and below). These are also labelled
accordind to their max value, so I can follow those big jumps when
they happen. The graph is quite clear considering 95% of my data is
within that range.

4) Edlira asked "why not simply write -line ivalue idate-"?. 
Because then Stata regards it all as one line, and connects the last
value (say of PID==2) to the first value of the next one (PID==3),
which is nonsensical (in my analysis).


Cheers, 

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