I have a dataset with many patients first year visit information. Then I want to get some information from the first year data into the second and third year. For example, for ID=1, then his age will be 51, 52 in the 2nd and 3rd year, while gender is still male. data have;
input id age visit gender $;
datalines;
1 50 1 male
1 . 2 .
1 . 3 .
2 60 1 female
2 . 2 .
2 . 3 .
;
run; what I want id age visit gender 1 50 1 male 1 51 2 male 1 52 3 male 2 60 1 female 2 61 2 female Thank you.
... View more