Programming the statistical procedures from SAS

how do I get confidence intervals for proportion

Reply
Occasional Contributor
Posts: 6

how do I get confidence intervals for proportion

Hello I'm having trouble obtaining 95% CI for a proportion. This proportion is a result of a binary variable crossed with another binary variable. I want to know the 95% CI for percentage of mothers that breastfeed exclusively (yes or no, binary) for women of diferent nationalities (also binary). I've tried variations of proc freq but its giving me the confidence interval of the odds ratio instead of for the actual values of % breastfeeding exclusvely. Any help?

 

proc freq data=meley.burum2; table momsnationality*exclusive/chisq; run;

 

*proc freq data=meley.burum2 order=freq;
tables exclusive/binomial;
tables momsnationality/binomial;
weight count;
run;*/

Grand Advisor
Posts: 9,466

Re: how do I get confidence intervals for proportion

It sounds like you want GROUP analysis.

 

proc freq data=meley.burum2 order=freq;
BY exclusive;
tables momsnationality/binomial;
weight count;
run;

Respected Advisor
Posts: 4,606

Re: how do I get confidence intervals for proportion

Sort by nationality and get the CI for each.

 

proc sort data=meley.burum2; 
by momsnationality; 
run;

proc freq data=meley.burum2;
by momsnationality;
tables exclusive / binomial;
weight count;
run;
PG
Ask a Question
Discussion stats
  • 2 replies
  • 321 views
  • 2 likes
  • 3 in conversation