/* For each family, ped_id starts with 1 */
data pedigree_id;
set family;
by id;
if first.id then ped_id=1;
else ped_id+1;
run;
/* using proc sql */
proc sql;
create table pedigree_id as
select family.*, monotonic() as _n_, calculated _n_-min(calculated _n_)+1 as ped_id
from family
group by id;
quit;
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment