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....
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.