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

I am not very familiar with multiple imputation, so I have been reading documentation and familiarizing myself today. I am trying to conduct an ANOVA with multiple imputation. 

  1. Is there a way to pool the data outside of PROC MIANALYZE, so I can generate graphs and what not?
  2. When I use PROC MIANALYZE, I am getting an error that my variables are not in my PARMS data set. Here is my code and the error:

proc mi DATA=DATASET OUT=OUTIMPUTE1 nimpute=5 SEED=12345;
CLASS AGE SEX;
var Age Sex VAR1 VAR2;
MONOTONE REGRESSION;
run ;

proc glm data=OUTIMPUTE1;
class age SEX VAR1 ;
model VAR2=VAR1 | age | SEX / SOLUTION;
BY IMPUTATION;
ODS output ParameterEstimates=glmparms;
quit;

PROC MIANALYZE PARMS(CLASSVAR=LEVEL)=glmparms;
CLASS VAR1 age SEX;
MODELEFFECTS VAR1 age SEX;
RUN;

 

"ERROR: Variable VAR1 is not in the PARMS= data set."

1 ACCEPTED SOLUTION

Accepted Solutions
5 REPLIES 5
PaigeMiller
Diamond | Level 26

Would you please show us (and in the future, always show us when you have an ERROR in the log) the ENTIRE log for these three PROC steps. In other words, we need to see 100% of the log, every single character, showing code as it appears in the log, plus all NOTEs, WARNINGs and ERRORs, with nothing chopped out.

 

Please copy the log as text and paste it into the "Insert Code" window that opens when you click on the </> icon. DO NOT SKIP THIS STEP.

--
Paige Miller
JonKetchup
Obsidian | Level 7

Sorry about that. Here is the entire log.

 proc mi DATA=DATASET OUT=OUTIMPUTE1 nimpute=5 SEED=12345;
305  CLASS AGE SEX;
306  var  Age Sex  VAR1 VAR2;
307  MONOTONE REGRESSION;
308  run ;

NOTE: The data set WORK.OUTIMPUTE1 has 390 observations and 41 variables.
NOTE: PROCEDURE MI used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds


309  proc glm data=OUTIMPUTE1 ;
310     class age SEX VAR1;
311     model VAR2=VAR1| age | SEX  / SOLUTION;
312  FORMAT AGE AGE.;
313  FORMAT SEX SEX.;
314  BY _IMPUTATION_;
315  ODS output ParameterEstimates=glmparms;
316  quit;

NOTE: The data set WORK.GLMPARMS has 180 observations and 8 variables.
NOTE: PROCEDURE GLM used (Total process time):
      real time           0.07 seconds
      cpu time            0.06 seconds


317  PROC MIANALYZE  PARMS(CLASSVAR=LEVEL)=GLMPARMS;
318  MODELEFFECTS INTERCEPT VAR1 age  SEX;
319  RUN;

ERROR: The model effect VAR1 is not in the PARMS= data set.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE MIANALYZE used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

 

PaigeMiller
Diamond | Level 26

While I am not all that familiar with PROC MIANALYZE, the first debugging step is for you to actually look at your data set named GLMPARMS (or run PROC CONTENTS) and see if variable VAR1 is in there.

--
Paige Miller
JonKetchup
Obsidian | Level 7

It is not; however, I am following the SAS documentation almost exactly for a GLM, but I am not using the covariance matrix in that code. Based on what I have seen from other examples, that is not necessary. 

SAS_Rob
SAS Employee

You should be able to follow this example

https://support.sas.com/kb/48/700.html 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 5 replies
  • 926 views
  • 1 like
  • 3 in conversation