|
Hi all ,
I have sorted my data set with the by variables and then
tried to transpose
within the by group with the id variable. But the problem is in my
data set , within the same by group i have duplicate id variable
values and proc transpose is ignoring those observations . Is there a
way to get around this .. any help is greatly appreciated.
this is the code i wrote :
proc transpose data = desktop.hosp_nonmissing1 out =
work.hosp_nonmissingt prefix = code let;
by patient_id hosp_adm_date hosp_disch_date;
var diag_code ;
id diag_code_number;
run;
log report :
The ID value "code1" occurs twice in the same BY group
sample observations where proc transpose is giving the error :
id date1 date2 diag_code_number
12345 11/23/2004 12/23/2004 1
12345 11/23/2004 12/23/2004 1
12345 11/23/2004 12/23/2004 2
12345 11/23/2004 12/23/2004 3
thanks in advance,
Rao.
|