BookmarkSubscribeRSS Feed
SAS93
Quartz | Level 8

I've downloaded the 2015-2020 all-sites ("overall") BRFSS datasets; I've worked with individual state-level datasets before to get general prevalence estimates for--say--reported depression.

 

I'm trying to get US/all-sites estimates for some measures not found on the CDC's online prevalence tool. I know they report median values.

 

What is the easiest way to go about this in SAS without getting stratified prevalence estimates for each state and then pasting it into Excel and finding the median from there? I want to get a median trend year-over-year. I was thinking of running the initial prevalence tables, then passing those to an SQL table and then finding the median from there? 

 

So far I've been running one single year's dataset and it's taken like 40 minutes and hasn't finished--not sure how I can speed that up. But any suggestions for faster processing and less coding mistakes (and thus having to go back and fix the code and re-run) would be super appreciated. 

1 REPLY 1
ballardw
Super User

If you have the combined data set with the state as a variable then you would add that state variable to the STRATA statement similar to a single state's data analysis. If the data set contains multiple years of data and has not beer reweighted then year should also appear on the strata as the weighting would be year dependent as well. This assumes you are using either the SAS survey procedures or possibly SAS callable SUDAAN to use the complex samples involved.

 

Any approach that summarizes data outside of the complex sample, such as SQL performed on summary sets would not be using the sample design properly and could be of questionable results on any measures using variability of data.

 

Without knowing what specific code you are running I can't say why it may be running that long but the single year sets are fairly large and multiple year would be worse. Complex large tables may taking a lot of time to display after the analysis is performed just formatting the results for the results window. It might help to show the code you are attempting as the time seems excessive for a single year set. Copy your code and paste into a text box on the forum.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 261 views
  • 0 likes
  • 2 in conversation