From: Al on

data have;
input pat vis res;
cards;
1 1 12
1 2 13
1 3 15
1 4 14
1 5 11
2 1 12
2 2 02
2 3 13
2 4 15
;
run;
Dear All:

This the dataset i have ..i want to create a new variable change
this change shoud be from vis = 3(3 being base line visit) to other
res values at different vis by each pat

Thanks in advance
Al
From: Tom Abernathy on
data want;
merge have have(keep=pat res rename=(res=vis3_res));
by pat;
change = res - vis3_res;
run;

On Jul 2, 10:46 am, Al <ali6...(a)gmail.com> wrote:
> data have;
>   input pat vis res;
>   cards;
>   1 1 12
>   1 2 13
>   1 3 15
>   1 4 14
>   1 5 11
>   2 1 12
>   2 2 02
>   2 3 13
>   2 4 15
> ;
> run;
> Dear All:
>
> This the dataset i have ..i want to create a new variable change
> this change shoud be from vis = 3(3 being base line visit) to other
> res values at different vis by each pat
>
> Thanks in advance
> Al