LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 1999, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 21 Oct 1999 09:18:51 -0700
Reply-To:     "Berryhill, Tim" <TWB2@PGE.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Berryhill, Tim" <TWB2@PGE.COM>
Subject:      Re: merging problems.
Comments: To: Panos PAPANIKOLAOU <PapanikolaouP@CARDIFF.AC.UK>
Content-Type: text/plain

Panos, It is not clear that your problem can be solved. The note that dates were dropped because of data entry errors concerns me. That sounds like the dataset TAKEN will have multiple observations for some ID's (CRN's), and some variables will change--same ID but different DIAG or TREAT depending on the dates. Unfortunately, when you merge back to MASTER to pick up the admission and discharge dates, you will not be sure which DIAG and TREAT match which ADMIT and DISCHARG.

One approach is to just hope that the entries are sorted by date already:

DATA NEW; MERGE MASTER(KEEP=CRN ADMIT DISCHARG SURNAME FORENAME GENDER M1 M2 M3) TAKEN(IN=TAKEN KEEP=CRN TREAT DISCHARG); BY CRN; IF TAKEN; RUN;

Tim Berryhill - Contract Programmer and General Wizard TWB2@PGE.COM or http://www.aartwolf.com/twb.html Frequently at Pacific Gas & Electric Co., San Francisco The correlation coefficient between their views and my postings is slightly less than 0


Back to: Top of message | Previous page | Main SAS-L page