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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!

Register now

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
  • 737 views
  • 3 likes
  • 2 in conversation