Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: how to get a line (or scatter)graph alike the linkplot of Nick Cox?
From
Nick Cox <[email protected]>
To
[email protected]
Subject
Re: st: how to get a line (or scatter)graph alike the linkplot of Nick Cox?
Date
Fri, 6 Jan 2012 15:15:09 +0000
Sorry, but I don't understand the question. If -linkplot- (SSC) gives
you what you want, what are you missing?
-linkplot- is in my view not especially suitable as a candidate for a
-twoway- plottype, but that is immaterial, as you can combine it with
other plottypes using its -plot()- option. (Works like -addplot()- for
those with Stata 9 up.)
Anyone new to -linkplot- could also look at
SJ-4-3 gr0005 . . . . . Speaking Stata: Graphing agreement and disagreement
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . N. J. Cox
Q3/04 SJ 4(3):329--349 (no commands)
how to select the right graph to portray comparison or
assessment of agreement or disagreement between data
measured on identical scales
Nick
2012/1/6 José Maria Pacheco de Souza <[email protected]>:
> I need to get a line (or scatter) plot where lines of different individuals
> do not connect, even when the first time of observation of one starts after
> the end of another.
> The small data set bellow and the commands show what I would like to
> get,using -linkplot- written by Nick Cox and what I would not want to get,
> using either line or scatter. The lines for individuals id=76 and id=137
> *should be two separated lines*.
>
> id age zpi
> 27 8 -.4003515
> 27 12 .7188796
> 27 16 -.0958611
> 27 20 .0375383
> 27 24 .2878524
> 76 7 -.6242654
> 76 11 .3159339
> 137 17 -.6290992
> 137 21 -.2678947
> 436 10 .0439807
> 436 13 -.6680512
> 436 17 -.7185947
> 436 21 -1.088822
>
> (Stata 10, same results for Stata12. Operational system Windows7 32 bits)
>
> linkplot zpi age,link(id) mlabel(id)
>
> scatter zpi age,sort( id age) con(ascending) mlabel(id)
> line zpi age,sort( id age) con(ascending)
>
> By the way, is it possible to make -linkplot- a twoway plottype?
*
* 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/