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

Greetings community,

am trying to do multiple imputation and I which to have pooled estimates through the function MIANALYZE by region, but I don't how to include that in my code

proc mi nimpute=2 data=Work.query seed=45 out=want_imp1;
class age7 sgp region province ghq12 sex;
fcs regression (lnbmi) logistic (sgp) discrim (province) ;
var id hh wfin  age7 lnbmi    ghq12  province region sgp sex;
run ;
 

proc mixed data= want_imp1;
title 'PROC MIXED weighted + clustered GP after MI';
by _imputation_ regionch;
weight wfin;
class hh age7 sex sgp ;
model lnbmi = GHQ12 sgp sex*age7 / solution covb;
random intercept / subject=hh;
ods output SolutionF = mixed_GP_parms covb = mixed_GP_cov;
run;


proc mianalyze parms=mixed_gp_parms ;
title 'MIANALYZE of MIXED with GP as covariate';
class sgp sex age7 ;
modeleffects intercept sgp  age7*sex;
by region run;
 

Thanks very much.

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

It looks like the data is not properly sorted.  Try sorting it first and see if that takes care of the issue.

 

 

proc sort data=mixed_gp_parms;
by region _imputation_;
run;

proc mianalyze parms=mixed_gp_parms ;
title 'MIANALYZE of MIXED with GP as covariate';
class sgp sex age7 ;
modeleffects intercept sgp age7*sex;
by region;
run;

 

View solution in original post

4 REPLIES 4
SAS_Rob
SAS Employee

That code should work, assuming you have a typo in the MIXED code on the BY statement with the variable regionch instead of region.  Can you post the LOG so we can see exactly what is going wrong?

SAS_Rob
SAS Employee

It looks like the data is not properly sorted.  Try sorting it first and see if that takes care of the issue.

 

 

proc sort data=mixed_gp_parms;
by region _imputation_;
run;

proc mianalyze parms=mixed_gp_parms ;
title 'MIANALYZE of MIXED with GP as covariate';
class sgp sex age7 ;
modeleffects intercept sgp age7*sex;
by region;
run;

 

Gilles-Protais
Obsidian | Level 7

Thanks very much. It worked for me.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 4 replies
  • 902 views
  • 0 likes
  • 2 in conversation