title: Outputting predicted values in SAS proc mixed: Prohibitive performance issues
body: <p>I've noticed strange behavior with SAS proc mixed: Models with a modestly large number of rows, which take only seconds to converge, nevertheless take upwards of half an hour to finish running if I ask for output of predicted values &amp; residuals. The thing that seems perverse is that when I run the analogous models in R using nlme::lme(), I get the predicted values &amp; residuals as a side effect and the models complete in seconds. That makes me think this is not merely a memory limitation of my machine.</p>
  
  <p>Here's some sample code. I can't provide the real data for which I'm seeing this issue, but the structure is 1-5 rows per subject, ~1500 unique subjects, ~5,000 outcome-covariate sets total.</p>
  
  <p>In SAS:</p>
  
  <pre><code>proc mixed data=testdata noclprint covtest;
      class subjid ed gender;
      model outcome = c_age ed gender / ddfm=kr solution residual outp=testpred;
      random int c_age / type=un sub=subjid;
  run;
  </code></pre>
  
  <p>In R:</p>
  
  <pre><code>lme.test &lt;- lme(outcome ~ c_age + ed + gender, data=testdata, 
                 random = ~c_age|factor(subjid), na.action=na.omit)
  </code></pre>
  
  <p>Relevant stats: Win7, SAS 9.4 (64-bit), R 3.3, nlme 3.1-131.</p>