BookmarkSubscribeRSS Feed
liiiiiiiib
Calcite | Level 5

Hello, I am a novice in SAS analysis. When using SAS to analyze complex sampling data, I found that when some proportions are small or large, the confidence interval is less than 0 or greater than 1, which is obviously impossible. Below is my code. What can I do to solve it? Drcat is a binary variable. I want to count its prevalence and confidence interval in the target population.

thank you !!!!!!!!!!!!

proc surveymeans data=allcomcat99 nomcar VARMETHOD=TAYLOR ;
stratum sdmvstra;cluster sdmvpsu; class agegroup;
var drcat;
domain sub sel;
weight wtmec2yr;
title "dr prevanlence";
run;
1 REPLY 1
PaigeMiller
Diamond | Level 26

Means are continuous and scaled between negative infinity and positive infinity. There's no reason a mean (or a confidence interval for a mean) can't be less than zero.

 

Proportions are continuous but scaled between 0 and 1. Proportions (and confidence intervals for proportions) cannot be less than 0. You want to have SAS compute proportions, not means. To compute proportions, use PROC SURVEYFREQ.

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 389 views
  • 3 likes
  • 2 in conversation