BookmarkSubscribeRSS Feed
NG1
Calcite | Level 5 NG1
Calcite | Level 5

I conducted a survey in multiple healthcare clinics to assess the prevalence of certain conditions (e.g., diabetes).  I am trying to calculate the proportion and 95% CI for those with the condition after weighting by size of clinic (i.e., number of total clinic visits that year).

I tried using the following procedure:

     proc surveyfreq data=survey;

          tables diabetes / cl;

          weight visits;

     run;

Question --- I want to calculate a 95% CI that takes into account the variance from each stratum (each facility) that was used to calculate that weighted proportion.  Does this code do this?  Or does it merely take the final weighted proportion and then calculate a 95% CI around it assuming n observations?  Also, I saw on a related post something about taking target population into account when calculating confidence limits using proc surveyfreq.  Is there a way to do this?

Appreciate your help!

1 REPLY 1
ballardw
Super User

If you sampled by strata then you definately need a STRATA statement and possible associated sample rates  with the RATE= option or different counts using a  Total=option dataset. Look in the Surveyfreq online help for the descriptions of the data sets required with the Rate or Total option.


sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2876 views
  • 0 likes
  • 2 in conversation