BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
RTurpin
Fluorite | Level 6

Good afternoon all. I'm writing because I am analyzing complex survey data, and trying to run PROC SURVEYFREQ to analyze depression and anxiety by self-rated health. When I attempt to run it, SAS Studio softlocks, as it keeps waiting but never actually gets anywhere. I don't get any error screens or anything. The other survey procedures (PROC SURVEYLOGISTIC) work fine. Here is my code (though I don't think the issue is the code itself):

 

PROC SURVEYFREQ Data=Hlth.MHlth;
TABLES health*depression health*anxiety;

STRATA stratum;
WEIGHT fsweight;
CLUSTER psu;
TITLE "Health by Depression Tables";
RUN;

 

I appreciate any advice you might have on this, as I am completely stumped.

1 ACCEPTED SOLUTION

Accepted Solutions
RTurpin
Fluorite | Level 6

Thanks all, I think I figured it out: PROC SURVEYFREQ just runs incredibly slowly on SAS Studio. It eventually worked after a very long wait period.

 

Thanks,

Rod Turpin

View solution in original post

5 REPLIES 5
Reeza
Super User

Are you using SAS UE?

 

How big is your dataset?


Can you run the PROC SURVEYFREQ from the examples?

RTurpin
Fluorite | Level 6

Thanks for the quick reply. I am using SAS University Edition, and it's a small dataset wiuth ~500 observations. Also, it seems to not work when I use the stratum and cluster statements together. If I use the weight and cluster statements, or the weight and stratum statements, it runs fine.

Reeza
Super User

So, SAS Studio isn't good at always throwing errors, sometimes it freezes and that's what you're running into. 

There is a mistake somewhere in the logic/code, but I don't the proc well enough to comment on that portion.

ballardw
Super User

I think you need a TOTAL dataset on the proc statement to the total number of clusters in the population for each level of the STRATA variable.

RTurpin
Fluorite | Level 6

Thanks all, I think I figured it out: PROC SURVEYFREQ just runs incredibly slowly on SAS Studio. It eventually worked after a very long wait period.

 

Thanks,

Rod Turpin

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1658 views
  • 0 likes
  • 3 in conversation