turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- Base SAS Programming
- /
- Funnel plot using SAS Base for rates

Topic Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-12-2016 12:23 PM

I was trying to caalculate the limits from the post http://blogs.sas.com/content/iml/2011/11/23/funnel-plots-for-proportions.html#comment-235504

But in SAS Base, without using SAS IML.

We are working with rates (occurence per 10.000 subjects) but I guess I'm doing something wrong.

My limits are really not good (normal approximation).

This is what I was doing:

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?

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;

I guess my std_overall is not correct? Shouldn't I use the overall sample variance to calculate the limits?