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
- /
- SAS Procedures
- /
- proc surveymeans confidence interval

- Subscribe to 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
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-11-2008 07:07 PM

I've the following code. I'm stratifying by race/ethnicity. The combined sample size is around 1500. Race stratum sample sizes are as small as 32 and as large as 400. Problem is, I'm getting the following:

race unknown (n=32): ratio and CL: 91.4% +/- 12.3% immunization coverage for DTP

race unknown (n=32); ratio and CL: 87.5%=/- 12.0% for Polio

If a child is vaccinated at 3 mo for DTP, they are given a '1'; otherwise, they are given a '0'. Same with Polio.

Records is the number of people in that particular stratum (race/ethnicity).

Why does the % exceed 100 for some but not all of the values??

proc surveymeans data=sample ratio clm nobs;

var 3moDTP 3moPolio 3moVar records;

format &by &by.f.;

by &by; %*--- by statement requests analysis by race/ethincity;

ratio 3moDTP 3moPolio 3moVar

/ records; %*--- ratio statement requests analysis for proportions (iz coverage);

strata pub_priv;* --- strata statement identifies strata in a stratified sample design;

cluster num; %*--- cluster statement identifies clusters in a clustered sample design;

%*--- only print output datasets from ods if in testing mode.;

ods output ratio=EKRSoutput1; %*--- ods output ratio statement produces a sas

data set with proportions and relevant statistics;

run;

%*--- calculate 95% confidence intervals.;

data sampleoutput;

set sampleoutput;

ci=ratio-lowercl;

drop denominatorname stderr n lowercl uppercl;

run;

race unknown (n=32): ratio and CL: 91.4% +/- 12.3% immunization coverage for DTP

race unknown (n=32); ratio and CL: 87.5%=/- 12.0% for Polio

If a child is vaccinated at 3 mo for DTP, they are given a '1'; otherwise, they are given a '0'. Same with Polio.

Records is the number of people in that particular stratum (race/ethnicity).

Why does the % exceed 100 for some but not all of the values??

proc surveymeans data=sample ratio clm nobs;

var 3moDTP 3moPolio 3moVar records;

format &by &by.f.;

by &by; %*--- by statement requests analysis by race/ethincity;

ratio 3moDTP 3moPolio 3moVar

/ records; %*--- ratio statement requests analysis for proportions (iz coverage);

strata pub_priv;* --- strata statement identifies strata in a stratified sample design;

cluster num; %*--- cluster statement identifies clusters in a clustered sample design;

%*--- only print output datasets from ods if in testing mode.;

ods output ratio=EKRSoutput1; %*--- ods output ratio statement produces a sas

data set with proportions and relevant statistics;

run;

%*--- calculate 95% confidence intervals.;

data sampleoutput;

set sampleoutput;

ci=ratio-lowercl;

drop denominatorname stderr n lowercl uppercl;

run;