Proc Mixed fails to compute because of memory

Occasional Contributor
Posts: 9

Proc Mixed fails to compute because of memory


I am running multivariate multilevel growth model on SAS 9.3 (x64bit) with two random components (one for intercept and one for slope). I have two dependent variables (DV). I have approximately 6000 subjects and 80000 rows or 40000 for each DV.  I used the following codes in which med is the dummy for two DVs:

proc mixed data= mult  covtest asycorr noclprint;

ods output solutionF=Fixed7 covparms=cov7

   tests3=test3_7 fitstatistics=fitstat7  gcorr=gcor7;

class enrolid med ;

model adh = med med*qtr med*age /noint s;

random med med*qtr /type=un sub=enrolid g gcorr;

repeated /type=vc group=med subject=enrolid;


It computes when Random intercept model is run (i.e., if 'med*qtr' is dropped from the model and random statements). But, SAS can NOT run it as growth model and reports "integer overflow...2429.72M bytes of memory cannot be allocated" problem although I have 4 GB RAM. I tried to allot as much memory as possible but it did not work out. Please suggest any solutions or share if you see any issues.

Respected Advisor
Posts: 2,655

Re: Proc Mixed fails to compute because of memory

If enrolid is a numeric variable, then try sorting the dataset by enrolid, and eliminating enrolid from the class statement.  If enrolid is alphanumeric, then create a nurmeric variable to use in its place.  I cannot gurantee that this will solve the problem, but it should help.

Other questions that having the answer to may help solve this: What does the variable 'qtr' represent?  Is it a successive time variable?  Since this is in proc mixed, the Kronecker product variance structures are available.  What happens (especially to the R part of the Z matrix) if you shift to:

repeated med qtr/type=un@cs subject=enrolid;

This structure is presented in the documentation for the REPEATED statement, with an example where the responses are height and weight (Var), which looks equivalent to your 'med.'

I hope this helps some.

Steve Denham

Posts: 27

Re: Proc Mixed fails to compute because of memory

Posts: 1,307

Re: Proc Mixed fails to compute because of memory

Posted in reply to SandorSzalma

I don't know if this applies to your problem, but I have seen cases with other SAS procs where they internally use signed integer for limits, so they can't assign more than 2**31 (2,147,483,648) of something. I'm not aware of any workaround for this problem.


Occasional Contributor
Posts: 9

Re: Proc Mixed fails to compute because of memory

Thanks a lot guys!!

@ Steve, I took enrolid off from the class statement and replaced with a numeric one. But, it did not help.

Surprisingly, it  fails to use all of 4 GB to run when SAS default ddfm is used on the model statement. It runs successfully only when I reduce the number of subjects to 4500 (approx.) with the default containment method.

Anyway, I could finally run the model with some alternative 'ddfm= ' specifications (e.g., residual, KR, etc.) on the model statement.

Friends, thanks again for your time!!

New Contributor
Posts: 4

Re: Proc Mixed fails to compute because of memory

Hello, your thread is the only one I found that mentions running a multivariate multilevel model. Can you direct me to any resources on how to use SAS to run this model? Thank you for your time!

Ask a Question
Discussion stats
  • 5 replies
  • 5 in conversation