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: repeated measures
From
Michael Eisenberg <[email protected]>
To
[email protected]
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/