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

Hi all,
I am trying to pool estimates from PROC GLIMMIX( continuous dependent variable) using PROC MIANALYZE for three-level mixed linear modeling. The dataset I am using is from a complex sample with multilevel weights. I imputed (n=15) data outside SAS and I changed that imputation variable to match with SAS default. However, I keep getting errors. It looks like it had to do with the interaction term, maybe not!! How can I fix this? I have copied the SAS codes below. I'd be thankful if I could get help with this.
PROC GLIMMIX DATA = IMPOUT.DSRTLONGDELETED METHOD=QUAD(FASTQUAD) noclprint plots=all;
by _mult_;
CLASS RAHHIDPN STRATCLUS APOE_n (ref='33') alc (ref='0') smoke(ref='0') GENDER (REF='2') RACE_ETH(ref='0') maritalstat(ref='1')
meds(ref='0') hear(ref='5') sleep(ref='1') stroke(ref='0') diab(ref='0') HTN(ref='0') heartdz(ref='0');
MODEL COGSCR = time smoke apoe_n time*smoke time*apoe_n PAscr SEscr alc smoke BMI
GENDER EDU ciyrsn RACE_ETH R7AGE_N maritalstat income cesd meds hear sleep numcond stroke diab HTN heartdz Funcstat/ SOLUTION DDFM=RESIDUAL obsweight=lev1wt ;
RANDOM INTERCEPT /subject=STRATCLUS type=VC weight=lev3wt; /**LEVEL 3 VARIABLES**/
RANDOM INTERCEPT /subject=RAHHIDPN(STRATCLUS) type=VC weight=lev2wt; /**LEVEL 2 VARIABLES**/
NLOPTIONS GCONV=0.00001;
COVTEST/WALD;
ODS OUTPUT parameterestimates=IMPOUT.PARAMSMOKEdeleted;
store SMOKEdeleted;
RUN;

DATA PARAMSMOKEdeleted;
SET IMPOUT.PARAMSMOKEdeleted;
RENAME _MULT_ = _IMPUTATION_;
RUN;

PROC SORT DATA=PARAMSMOKEdeleted; by _IMPUTATION_ ;RUN;

PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted; /**Also used classvar=level, but still get the error saying nolevel variable in the dataset**/
BY _IMPUTATION_ ;
CLASS APOE_n SMOKE ALC GENDER RACE_ETH maritalstat meds hear sleep stroke diab HTN heartdz;
MODELEFFECTS INTERCEPT time smoke apoe_n time*smoke time*apoe_n PAscr SEscr alc smoke BMI
GENDER EDU ciyrsn RACE_ETH R7AGE_N maritalstat income cesd meds hear sleep numcond stroke diab HTN heartdz Funcstat;
RUN;

/**SAS LOG**/
ERROR: Within-imputation Estimate missing for effect smoke in _Imputation_= 1 in the input
PARMS= data set.
NOTE: The above message was for the following BY group:
_IMPUTATION_=1
ERROR: Observation with _Imputation_=1 is not in the input PARMS= data set.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE MIANALYZE used (Total process time):

EstimatesTable.pngVariable names.png

1 ACCEPTED SOLUTION

Accepted Solutions
SAS_Rob
SAS Employee

I just noticed that you have a BY statement in MIANALYZE.  You will need to remove that.

MIANALYZE is also balking at the ordering of the SMOKE variable.  You can avoid that by running separate MIANALYZE steps.

 

PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted;
CLASS APOE_n ALC GENDER RACE_ETH maritalstat meds hear sleep stroke diab HTN heartdz;
MODELEFFECTS INTERCEPT time apoe_n PAscr SEscr alc smoke BMI
GENDER EDU ciyrsn RACE_ETH R7AGE_N maritalstat income cesd meds hear sleep numcond stroke diab HTN heartdz Funcstat;
RUN;
PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted;
class smoke;
modeleffects smoke time*smoke time*apoe_n;
run;

View solution in original post

6 REPLIES 6
SAS_Rob
SAS Employee

Could you post the full PARAMSMOKEdeleted data set?

SAS_Rob
SAS Employee

I just noticed that you have a BY statement in MIANALYZE.  You will need to remove that.

MIANALYZE is also balking at the ordering of the SMOKE variable.  You can avoid that by running separate MIANALYZE steps.

 

PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted;
CLASS APOE_n ALC GENDER RACE_ETH maritalstat meds hear sleep stroke diab HTN heartdz;
MODELEFFECTS INTERCEPT time apoe_n PAscr SEscr alc smoke BMI
GENDER EDU ciyrsn RACE_ETH R7AGE_N maritalstat income cesd meds hear sleep numcond stroke diab HTN heartdz Funcstat;
RUN;
PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted;
class smoke;
modeleffects smoke time*smoke time*apoe_n;
run;

Chudamani
Obsidian | Level 7

Thanks for your help, Rob. This worked but there is a column named "NImpute". I believe this is telling me the total number of imputed datasets used to pool the estimates, correct? Just making sure that I can report the SAS output generated by the code you provided as my results. Thanks.

PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted;
CLASS APOE_n ALC GENDER RACE_ETH maritalstat meds hear sleep stroke diab HTN heartdz;
MODELEFFECTS INTERCEPT time apoe_n PAscr SEscr alc smoke BMI
GENDER EDU ciyrsn RACE_ETH R7AGE_N maritalstat income cesd meds hear sleep numcond stroke diab HTN heartdz Funcstat;
ODS OUTPUT parameterestimates=SMOKERESULT;
RUN;
PROC CONTENTS DATA=SMOKERESULT;RUN;
PROC MIANALYZE PARMS(classvar=full)=PARAMSMOKEdeleted;
class smoke;
modeleffects smoke time*smoke time*apoe_n;
ODS OUTPUT parameterestimates=SMOKERESULTINT;
run;

Chudamani
Obsidian | Level 7
That's awesome. Thank you for the clarification.

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
  • 6 replies
  • 607 views
  • 2 likes
  • 2 in conversation