Statistical Procedures

Programming the statistical procedures from SAS
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-white.png

Join us for our biggest event of the year!

Four days of inspiring keynotes, product reveals, hands-on learning opportunities, deep-dive demos, and peer-led breakouts. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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