In reply to Rick Wicklin.

I guess I'm doing something wrong because my normal approx. is really bad...
Is it correct to calculate the sample variance and to use this to calculate the limits?
We are are working with rates (per 10.000 patients).

I'm doing something like this:

DATA std;
SET CDIF_HOSP_SUMMARY(WHERE=(MS_HOS_SURV_PAT NE .)) END=EOF;
RETAIN sumdif count 0;
count = count +1;
sumdif = sum(sumdif,(MS_HA_PAT-&AvgProp.)**2);
IF eof THEN DO;
std = sqrt(sumdif/count);
call symput('std_overall',std);
END;
RUN;
%PUT &std_overall.;

/*** we nemen de standard normale verdeling ***/
DATA limieten;
/* 0.001 0.025 0.975 0.999 */
p1 = quantile("normal", 0.001);
p2 = quantile("normal", 0.025);
p3 = quantile("normal", 0.975);
p4 = quantile("normal", 0.999);
DO vz = &minN TO &maxN by 20;
p2sigmaL = &AvgProp. + (&std_overall./sqrt(vz))*p1;
p3sigmaL = &AvgProp. + (&std_overall./sqrt(vz))*p2;
p2sigmaH = &AvgProp. + (&std_overall./sqrt(vz))*p3;
p3sigmaH = &AvgProp. + (&std_overall./sqrt(vz))*p4;
output;
END;
RUN;

Seems that I'm doing something wrong?!