Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: repeated measures


From   Michael Eisenberg <meisenberg713@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: repeated measures
Date   Tue, 7 Sep 2010 14:54:42 -0500

Colleagues,

I have a problem I hope you can help with that involves cleaning a
dataset for analysis.

I have a dataset with about 10K men.  Several men had multiple clinic
visits, so that there are about 12K observations.  There is also some
lab data that I'll need that was not obtained until follow up visits.

I would like to only analyze data from the earliest visit and the
first available lab data.

Can stata do this?


Turn this

patient     visitdate    sbp       dm          glu
1              1/1/09       140       .             .
1              1/4/09       128       .            202
1              2/1/09       131      1            .

2              4/1/09       160      .             341
2              4/4/09       144       .            180
2              5/1/09       170      1            .

3              6/1/09       119       .             .
3              6/4/09       107       .            .
3              7/1/09       124      .            96

4              9/1/09       104       1          110
4              9/4/09       155       .            .
4             10/1/09       .         .              .

Into this

patient     visitdate    sbp       dm          glu
1              1/1/09       140      1             202
2              4/1/09       160      1            341
3              6/1/09       119       .            96
3              9/1/09       104      1            110




Thanks in advance.

Mike
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index