@Dsquared wrote:
Here they are. It is longitudinal data.
CtClaims
data work.ctclaims; input patid eventdate medcode yob elig_start elig_end; datalines; 1111 3/24/99 12 1930 9/11/99 10/31/99
1111 1/20/01 34 1930 9/11/99 10/31/99
1001 5/20/06 57 1980 5/11/09 5/3/09 ; run;
CodelistP
data work.codelistP; input disease medcode; datalines; pregnancy 34
pregnancy 127
pregnancy 294
; run;
Thanks so much!!
Well, it's the data:
data work.ctclaims;
input patid eventdate medcode yob elig_start elig_end;
datalines;
1111 3/24/99 12 1930 9/11/99 10/31/99
1111 1/20/01 34 1930 9/11/99 10/31/99
1001 5/20/06 57 1980 5/11/09 5/3/09
;
run;
proc print data=work.ctclaims noobs;
run;
Result:
elig_
patid eventdate medcode yob start elig_end
1111 . 12 1930 . .
1111 . 34 1930 . .
1001 . 57 1980 . .
If this is just a problem with your datastep/datalines code, use the macro from https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-data-AKA-generate/ta-p/258712 to convert your dataset to a datastep as it really is.
... View more