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.
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
Are you using SAS UE?
How big is your dataset?
Can you run the PROC SURVEYFREQ from the examples?
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.
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.
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.
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 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.