There's another way to interpret your request. It's possible you want exactly the same numbers you got from your original program, but with S=1 on the first observation. For that:
data B;
S=1;
P=0.02;
do year=1 to 4;
S=S*(1-P);
if year=1 then replacement_S=1;
else replacement_S = S;
P_marg = S * P;
output;
end;
drop S;
rename replacement_S = S;
run;
... View more