home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / bit / listserv / sasl / 5514 < prev    next >
Encoding:
Text File  |  1993-01-05  |  1.8 KB  |  61 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!psuvm!auvm!UGA.BITNET!FDANE
  3. Message-ID: <SAS-L%93010510511308@UGA.CC.UGA.EDU>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Tue, 5 Jan 1993 10:49:35 EST
  6. Reply-To:     Frank Dane <FDANE@UGA.BITNET>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         Frank Dane <FDANE@UGA.BITNET>
  9. Subject:      Match Merge Problem
  10. Lines: 49
  11.  
  12. Platform:  Windows 6.08 Developer's Version
  13. Problem:   MERGE doesn't behave
  14.  
  15. I've got a data file on coronary arrests that looks like:
  16.  
  17. pt#  varA1 varB1 ncode ...
  18. 12    90    100   1
  19. 12    85    50    2
  20. 13    70    80    1
  21.  
  22. in which each subsequent appearance of the same pt# represents a
  23. second (ncode = 2) or third arrest episode on the same patient.
  24. I tried extracting all cases for ncode = 1 into one file, call it
  25. code1, and then all cases with ncode = 2 into a second file,
  26. code2.  When I tried a match merge in order to do some repeated
  27. measures analyses, what I wanted was:
  28.  
  29. pt#  varA1 varB1 varA2 varB2
  30. 12    90    100   85    100
  31. 13    70    80     .     .
  32.  
  33. but what I got was:
  34.  
  35. pt#  varA1 varB1 varA2 varB2
  36. 12    90    100    .     .
  37. 12     .      .   85    50
  38. 13    70    80     .     .
  39.  
  40. Within files code1 and code2, pt# is a unique identifier and is
  41. the only variable name common to both files.  Both code1 and
  42. code2 have been sorted by pt#, although code2 contains only about
  43. a third as many cases as code1.
  44.  
  45. The code was:
  46.  
  47. DATA people;
  48.      merge code1 code2;
  49.      by pt#;
  50.  
  51. Can someone tell me what went wrong. or suggest a better way to
  52. accomplish what I want?
  53.  
  54. TIA,
  55. Dr. Francis C. Dane, Associate Professor and Chair
  56. Department of Psychology, Mercer University
  57. Macon, GA  31207-0001  USA
  58. Bitnet: FDANE@UGA   Internet: FDANE@UGA.CC.UGA.EDU
  59. Tel: (912) 752-2972
  60. Fax: (912) 752-2108
  61.