BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
Chudamani
Obsidian | Level 7

I have been trying to combine estimates for random effects after running PROC GLIMMIX in a multiply imputed dataset. However, I keep getting errors. Any help is appreciated.

The code I used in GLIMMIX to create a dataset with random effects:
PROC GLIMMIX DATA = FULL.DSRTLONGFULL METHOD=QUAD(FASTQUAD) noclprint plots=all;
by _IMPUTATION_;
CLASS RAHHIDPN STRATCLUS   alc (ref='0') smoke(ref='0') GENDER (REF='2') RACE_ETH(ref='1') maritalstat(ref='1')meds(ref='0') hear(ref='5') sleep(ref='1');
MODEL COGSCR = time BMI time*BMI time  BMI  time*BMI  PAscr SEscr alc smoke  
GENDER EDU ciyrsn RACE_ETH R7AGE_N maritalstat income cesd meds hear sleep numcond Funcstat/ SOLUTION DDFM=RESIDUAL obsweight=lev1wt ;
RANDOM INTERCEPT /subject=STRATCLUS  solution type=VC weight=lev3wt; /**LEVEL 3 VARIABLES**/
RANDOM INTERCEPT /subject=RAHHIDPN(STRATCLUS) solution type=VC weight=lev2wt; /**LEVEL 2 VARIABLES**/
COVTEST/WALD;
ODS OUTPUT parameterestimates=FULL.PARAMBMI covparms=full.randombmi;
store BMIall;
RUN;

The MIANALYZE Code:
proc sort data=full.randombmi;
by effect subject _imputation_;
run;

proc mianalyze parms (classvar=Level)=full.randombmi;
by subject;
modeleffects intercept;
run;

The dataset with the estimates:

 

1 ACCEPTED SOLUTION

Accepted Solutions
3 REPLIES 3
SteveDenham
Jade | Level 19

Noting that you "keep getting errors" without giving us what is found in the log is like cutting off one leg before running a race.  Please post the log, being sure to including any DATA step messages prior to the errors.

 

SteveDenham

SAS_Rob
SAS Employee

You should be able to apply the 2nd example in the usage note below to your situation and get the results.

33131 - How do I combine the covariance parameters from PROC MIXED in PROC MIANALYZE? (sas.com)

Chudamani
Obsidian | Level 7
@SAS_Rob Thank you for the link. This worked perfectly.

SAS Innovate 2025: Call for Content

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 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3 replies
  • 853 views
  • 2 likes
  • 3 in conversation