home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!UGA.BITNET!FDANE
- Message-ID: <SAS-L%93010510511308@UGA.CC.UGA.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Tue, 5 Jan 1993 10:49:35 EST
- Reply-To: Frank Dane <FDANE@UGA.BITNET>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Frank Dane <FDANE@UGA.BITNET>
- Subject: Match Merge Problem
- Lines: 49
-
- Platform: Windows 6.08 Developer's Version
- Problem: MERGE doesn't behave
-
- I've got a data file on coronary arrests that looks like:
-
- pt# varA1 varB1 ncode ...
- 12 90 100 1
- 12 85 50 2
- 13 70 80 1
-
- in which each subsequent appearance of the same pt# represents a
- second (ncode = 2) or third arrest episode on the same patient.
- I tried extracting all cases for ncode = 1 into one file, call it
- code1, and then all cases with ncode = 2 into a second file,
- code2. When I tried a match merge in order to do some repeated
- measures analyses, what I wanted was:
-
- pt# varA1 varB1 varA2 varB2
- 12 90 100 85 100
- 13 70 80 . .
-
- but what I got was:
-
- pt# varA1 varB1 varA2 varB2
- 12 90 100 . .
- 12 . . 85 50
- 13 70 80 . .
-
- Within files code1 and code2, pt# is a unique identifier and is
- the only variable name common to both files. Both code1 and
- code2 have been sorted by pt#, although code2 contains only about
- a third as many cases as code1.
-
- The code was:
-
- DATA people;
- merge code1 code2;
- by pt#;
-
- Can someone tell me what went wrong. or suggest a better way to
- accomplish what I want?
-
- TIA,
- Dr. Francis C. Dane, Associate Professor and Chair
- Department of Psychology, Mercer University
- Macon, GA 31207-0001 USA
- Bitnet: FDANE@UGA Internet: FDANE@UGA.CC.UGA.EDU
- Tel: (912) 752-2972
- Fax: (912) 752-2108
-