Hello!
I'm trying to run proc surveymeans on a very large data set (14 million observations), and keep getting the following error messages:
NOTE: Only one cluster in a stratum for variable(s) ReadmitCHG. The estimate of variance for ReadmitCHG will omit this stratum.
ERROR: PROC SURVEYMEANS was terminated prematurely due to a memory shortage while computing quantiles. Increasing MEMSIZE and/or REALMEMSIZE may
allow normal processing to complete.
NOTE: Processing on disk occurred during summarization. Peak disk usage was approximately 62 Mbytes. Adjusting MEMSIZE and/or REALMEMSIZE may
improve performance.
ERROR: The SAS System stopped processing this step because of insufficient memory.
NOTE: PROCEDURE SURVEYMEANS used (Total process time):
real time 1:47.23
cpu time 1:46.69
Here is the code I have been using:
proc surveymeans data=index_events missing sumwgt sum mean;
strata NRD_STRATUM;
cluster HOSP_NRD;
weight DISCWT;
domain IndexEvent IndexEvent*AgeGroup;
var Readmit TOTCHG ReadmitCHG totalreadmissions;
ods output domain=domain;
run;
Does anybody have any advice on fixing the memory issue? I can't seem to figure it out. Thanks in advance!
You have to set it in the Config file or on startup.
I think there are instructions here that make sense:
https://stackoverflow.com/questions/37038194/increasing-sas-memory-memsize
Have you tried increasing MEMSIZE and REALMEMSIZE as the error indicates?
I have attempted to but I'm not sure if I am doing it properly. Any advice on how to increase memsize and realmemsize would be great.
You have to set it in the Config file or on startup.
I think there are instructions here that make sense:
https://stackoverflow.com/questions/37038194/increasing-sas-memory-memsize
I's not mentioned in the link but you can set memsize and realmemsize to the parameter MAX which will means SAS will use all the memory it can get - whether that's a good idea depends on your environment and how you're using SAS....
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
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.