LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (December 2000, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 20 Dec 2000 11:20:17 -0600
Reply-To:     JGerstle@SW.UA.EDU
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         John Gerstle <JGerstle@SW.UA.EDU>
Subject:      Coding diads - simple problem
Content-type: text/plain; charset=US-ASCII

Fellow SAS-L'ers, I've got a quick problem that has me stumped. I want to code each pair of ptid-staffid parings uniquely. A simple numeric coding will work. Below is my most recent attempt:

proc sort data care_baseline; by ptid staffid; run;

data care_phase2; set care_baseline; by ptid staffid; if first.ptid and first.staffid then diad + 1; run; proc print; run;

The output file has diad increasing from the first observation on but seems to only be counting each unique ptid and not the pairing that I want. I also tried :

if first.ptid and last.staffid then diad + 1;

but that didn't do it either. What am I missing here?

Thanks for any insight....John

John Gerstle Program Analyst, Sr. Applied Gerontology Program University of Alabama


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