BookmarkSubscribeRSS Feed
Monika_
Calcite | Level 5

Hi everybody

 

I am running the same proc mixed model with ddfm=kr for about 40 response variables * 5 subpopulations. The run time of proc mixed is either about 1.5 minutes or about 28 minutes, nothing inbetween. Is there a possibility to reduce the runtime for the variables which take long? Or to catch the ones with long run time and run ddfm=kr only for those with short run time (ddfm=bw for the others)? 

The statistical analysis plan requests to run first the model with ddfm=kr for each variable and switch to ddfm=bw if the first model does not coverge. However, it coverges, it just takes too long to be feasible. 

 

EDIT: it looks like the response variables with long run time are the ones with more repeats per subject (9 repeats p.s. in 'fast' variables vs. 14 repeats p.s. in 'slow' variables). Still I am wondering, that's only about 1.5 times more repeats. There are about 850 subjects. Is there a limit to the kr-method regarding the amount of data processed?   

 

Using SAS 9.2. The code is:

 

 

proc mixed data=datc(where=(avisitn gt 0));
  by paramn paramcd param;
  class avisitn trt01pn usubjid;
  model chg = avisitn trt01pn base weight 
              avisitn*trt01pn avisitn*base / ddfm=kr;
  lsmeans avisitn*trt01pn / diff cl;
  repeated avisitn / type=un subject=usubjid;
  ods output LSMeans=mlsmeans
             Diffs=mdiffs
             NObs=nobs
             ConvergenceStatus=mconvergence;
run;

 

paramn, paramcd and param have the same value within each modal call, the by-statement is used only to have the variables in the output datasets. The model is run in a %do loop for several response variables by selecting the response variables from the datasets.

 

Thanks!

 

1 REPLY 1
Haris
Lapis Lazuli | Level 10

1. There is an updated and streamlined KR2 now.  I would try that in place of the old KR.

2. Most likely the culprit for long run times is the TYPE=UN covariance matrix, rather than degrees of freedom.  Do you really need to estimate all covariances?  With 9 variables that's only 36 but with 14 it goes up to 91!  You don't have enough data to estimate that many parameters.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1312 views
  • 0 likes
  • 2 in conversation