Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: How to plot progression over time for individual cases/IDs

From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: How to plot progression over time for individual cases/IDs
Date   Tue, 3 Jul 2012 02:06:42 +0100

By "excel" I assume you mean MS Excel. Any presumption that Stata
users all have access to MS Excel and regard MS Excel as an
alternative to Stata is quite incorrect.

In any case, you appear to be overlooking -xtline-. But with 192
overlaid series I suspect the result is just a mess. I think you would
get as much insight by just looking at the pooled distributions with
(e.g.) -dotplot-.


On Tue, Jul 3, 2012 at 1:30 AM, Sofia Ramiro <[email protected]> wrote:

> OK, thanks.
> I managed to do it, according to your description, Maarten, but in fact, if plotting so many lines is always a challenge, it's even more with Stata (eg compared to excel), as the graph gets smaller and hardly seen.
> Unfortunately, I don't find a better way to do it than to reestructure the file (so that my outcome variable is split into different variables according to the timepoint) and then listing the variables per case/ID and copying pasting the values to excel (which requires to adjust the data to the tables, etc) and then finally plotting the graphs. Any better way to do it?
> then, for the stratifications (eg male/female), repeat the same procedure.
> In excel I do get some nice graphs that help to get insight into the data. It is just very time consuming to do all the copy/pastes and content adjusting into excel, but if there is not quicker way of doing it, that is how I do.

From: [email protected]

>> On Mon, Jul 2, 2012 at 3:03 PM, Sofia Ramiro wrote:
>> > I totally understand that the 192 patients will never be readable. However, if I could have each line with a different colour (even if there are repeated colours), I can gain more insight into the data and identify patterns.
>> >do you think there is any chance to have different colours for the lines?
>> If you insist on doing it this way than you can do so using -separate-:
>> separate fnmisi2totalmsassst, by(ov001)
>> twoway line fnmisi2totalmsassst? fnmisi2totalmsassst??
>> fnmisi2totalmsassst??? timepoint

*   For searches and help try:

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