Bookmark and Share

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]

st: Re: xtline: options for line color


From   "alison.drake" <[email protected]>
To   [email protected]
Subject   st: Re: xtline: options for line color
Date   Wed, 21 Jul 2010 13:59:01 -0700 (PDT)

I tried the plotline option (suggested by Scott) but I got an error saying
"too many options".  I think because I have 150 ID's, so I would have to
individually overlay 150 plots.  This doesn't seem to be a problem with just
the xtline command with an overlay option, but is with the plot() option.

The individual plot() commands are cumbersome since I have so many groups,
and I think I might have the "too many options" problem I encountered with
the loop.

I have also been digging deeper into the archives and tried to use the
linkplot, but can't find a way to get separate colors for different groups. 
Below please find a subset of my data below for additional reference:

Essentially, I want every id to have it's own line graphed, but the color
should vary based on the group variable (all group 0 are blue, group 1=red,
for example).  The visit is my time variable and vl is my yvariable.  As you
can see, the data is set up in long format, but I also have it in wide.

Any other suggestions on how to do this?
Thanks,
Alison

group	visit	vl	     id
0	0	5.221649	1
0	1	4.686413	1
1	0	5.174583	2
1	1	4.065019	2
1	0	2.720159	3
1	1	2.09691	3
1	0	4.345472	4
1	1	3.639984	4
1	0	4.234644	5
1	1	3.279895	5
1	0	2.09691	7
1	1	2.09691	7
1	0	3.385606	8
1	1	3.557507	8
1	0	4.165541	9
1	1	4.279781	9
1	0	3.987666	10
1	1	3.469085	10
1	0	4.307924	11
1	1	3.472756	11
0	0	5.521073	14
0	1	4.902003	14


-- 
View this message in context: http://statalist.1588530.n2.nabble.com/xtline-options-for-line-color-tp5318443p5322903.html
Sent from the Statalist mailing list archive at Nabble.com.
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index