You'll see it in the output window, if that's all you're using your fine. But if your process errors out at this step for any reason, then it won't get replaced in the loop and will use the old values. This is a bad practice because it's easy to get the wrong results in the output window and not realize it.
If the steps before work, it is getting overwritten so this data set would only have the results from the last run, not each run so if you want these values to do anything with in another step you do not have them anymore.
data new_Results2;
set &dat.;
IR=&var/n;
IR_1K=IR*1000;
LC=quantile('chisq',0.025, &var*2)/(n*2);
UC=quantile('chisq',0.975, (&var+1)*2)/(n*2);
res_l=LC*1000;
res_u=UC*1000;
run;
@sigma_exp wrote: Thank you Reeza for proposing the alternative solution, but would you please care to elaborate why is that: "BTW the way you're doing this would only leave you with the results from the last run, not all runs."? Because when I am looking at the output in the SAS window, I see the results corresponding to the specific variable during each iteration. And the estimates are also different for each loop.
... View more