Write and run SAS programs in your web browser

SAS Studio PROC SURVEYFREQ

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

SAS Studio PROC SURVEYFREQ

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.


Accepted Solutions
Solution
‎06-09-2017 01:32 AM
New Contributor
Posts: 3

Re: SAS Studio PROC SURVEYFREQ

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


All Replies
Super User
Posts: 18,569

Re: SAS Studio PROC SURVEYFREQ

Are you using SAS UE?

 

How big is your dataset?


Can you run the PROC SURVEYFREQ from the examples?

New Contributor
Posts: 3

Re: SAS Studio PROC SURVEYFREQ

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.

Super User
Posts: 18,569

Re: SAS Studio PROC SURVEYFREQ

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.

Super User
Posts: 10,871

Re: SAS Studio PROC SURVEYFREQ

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.

Solution
‎06-09-2017 01:32 AM
New Contributor
Posts: 3

Re: SAS Studio PROC SURVEYFREQ

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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