|
On Tue, 27 Jan 2009 09:31:40 -0800, Norris, Paul <Paul.Norris@UCSF.EDU>
wrote:
>I have a dataset that looks like the following:
>PatNo Asthma DM DF
>1 0 1 0
>1 1 0 0
>2 0 1 0
>2 1 0 0
>2 0 0 1
>
>I want to get it down to one line per patient where each condition which
>is present in any record has a 1.
>PatNo Asthma DM DF
>1 1 1 0
>2 1 1 1
>
>In other languages, I would do this with a WHILE statement on the PatNo.
>
>Help would be greatly appreciated for how to do this in SAS.
Paul,
Several people have responded with post that will achieve your goal. I
am just going to cause trouble. Why do you want to do this? I looks like
you could be possibly be losing valuable information, especially if the
data are longitudinal or spatial.
HTH,
Kevin
|