Hey!
I am using a mutliple imputation and then run a GEE model on the 10 imputed datasets. The GEE model includes interaction between time and treatment (denoted as "randomisering"). I manage to pool all the model coefficients with MIANALYZE, but the interaction term is not estimated (appears as 0 in the MIANALYZE table). I have checked that interaction term in MIANALYZE is called exactly the same as in the gmparms table, but still get no estimate.
proc genmod data=fatigue_migee; by _imputation_; class record_id gender randomisering timeclass; model fatigue_total = randomisering time_weeks randomisering*time_weeks gender inclusion_age/ dist=normaL LINK=identity maxiter=200 covb; repeated subject=record_id/ withinsubject=timeclass type=exch; ods output GEEEmpPEst=gmparms parminfo=gmpinfo CovB=gmcovb ; run; proc mianalyze parms(classvar= level)=gmparms; class gender randomisering; modeleffects Intercept randomisering time_weeks time_week*randomiser gender inclusion_age; run;Is there something I am missing? I see no reason that interaction term is not estimated, I have seen estiamtes in each of the 10 imputed datasets, so it should be possible to pool them.
Thank you in advance!
Your MODELEFFECTS statement should match your MODEL statement as far as the variable names is concerned. I think in your case there is some truncation that is going on from the GENMOD output. All you need to do is add the NAMELEN= option to the GENMOD code.
proc genmod data=fatigue_migee namelen=100;
by _imputation_;
class record_id gender randomisering timeclass;
model fatigue_total = randomisering time_weeks randomisering*time_weeks
gender inclusion_age/ dist=normaL LINK=identity maxiter=200 covb;
repeated subject=record_id/ withinsubject=timeclass
type=exch;
ods output GEEEmpPEst=gmparms parminfo=gmpinfo CovB=gmcovb ;
run;
proc mianalyze parms(classvar= level)=gmparms;
class gender randomisering;
modeleffects Intercept randomisering time_weeks randomisering*time_weeks
gender inclusion_age;
run;
Could you post the entire LOG that contains the GENMOD and MIANALYZE steps in it? Seeing the output might also be helpful in diagnosing what is going on.
Hi @SAS_Rob ,
Sure, I can copy the log output here, I think it does not say so much. I will also inlcude the MIANALYZE output table, which shows interaction effect as zero.
MIANALYZE LOG
40 proc genmod data=fatigue_migee;
41 by _imputation_;
42 class record_id gender randomisering timeclass;
43 model fatigue_total = randomisering time_weeks randomisering*time_weeks
44 gender inclusion_age/ dist=normaL LINK=identity maxiter=200 covb;
45 repeated subject=record_id/ withinsubject=timeclass
46 type=exch;
47 ods output GEEEmpPEst=gmparms parminfo=gmpinfo CovB=gmcovb ;
48 run;
NOTE: The variables in the WITHIN= subject effect are sorted by internal (unformatted) values. To sort by formatted values specify
the ORDER=FORMATTED option following the variable in the CLASS statement.
NOTE: Algorithm converged.
NOTE: Algorithm converged.
NOTE: The above message was for the following BY group:
Imputation Number=1
NOTE: Algorithm converged.
2
NOTE: The data set WORK.GMCOVB has 350 observations and 9 variables.
NOTE: The data set WORK.GMPINFO has 450 observations and 5 variables.
NOTE: The data set WORK.GMPARMS has 450 observations and 9 variables.
NOTE: PROCEDURE GENMOD used (Total process time):
real time 6.57 seconds
cpu time 6.57 seconds.
NOTE: PROCEDURE MIANALYZE used (Total process time):
real time 0.07 seconds
cpu time 0.07 seconds
44
45 %LET _CLIENTTASKLABEL=;
46 %LET _CLIENTPROCESSFLOWNAME=;
47 %LET _CLIENTPROJECTPATH=;
48 %LET _CLIENTPROJECTPATHHOST=;
49 %LET _CLIENTPROJECTNAME=;
50 %LET _SASPROGRAMFILE=;
2 The SAS System 08:39 Monday, March 23, 2026
51 %LET _SASPROGRAMFILEHOST=;
52
53 ;*';*";*/;quit;run;
54 ODS _ALL_ CLOSE;
NOTE: Writing EXCEL(EGXLSSX) file: /saswork/prod/SAS_work3C1D0000F862_dvh-p-grid-01.hn.helsenord.no/#LN07206
55
56
57 QUIT; RUN;
58
And here I upload the GMPARMS table which have estiamted interaction effect (time_weeks*randomisering), and the output of MIANALYZE, where this interaction effect is zero.
Your MODELEFFECTS statement should match your MODEL statement as far as the variable names is concerned. I think in your case there is some truncation that is going on from the GENMOD output. All you need to do is add the NAMELEN= option to the GENMOD code.
proc genmod data=fatigue_migee namelen=100;
by _imputation_;
class record_id gender randomisering timeclass;
model fatigue_total = randomisering time_weeks randomisering*time_weeks
gender inclusion_age/ dist=normaL LINK=identity maxiter=200 covb;
repeated subject=record_id/ withinsubject=timeclass
type=exch;
ods output GEEEmpPEst=gmparms parminfo=gmpinfo CovB=gmcovb ;
run;
proc mianalyze parms(classvar= level)=gmparms;
class gender randomisering;
modeleffects Intercept randomisering time_weeks randomisering*time_weeks
gender inclusion_age;
run;
Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.
Explore Now →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.