BookmarkSubscribeRSS Feed
chepchep
Fluorite | Level 6

Hello,

I am trying to analyze an imputed dataset. Everything runs okay except for proc mianalyze where I run into some problems. I am tyring to get pairwise differences of my class variable which has 3 categories.

Here is the code that I am using:

proc genmod data=mi_out;
by _imputation_;
/* Process each imputed dataset */
class matchid rand2;
/* 'matchid' identifies matched pairs,
'treatment' is the variable of interest */
model DIFF = rand2 / dist=normal;
/* 'outcome' is the continuous outcome */
repeated subject=matchid / type=cs;
/* Matched pairs, compound symmetry */

/* Define pairwise comparisons using ESTIMATE statements */
estimate 'rand2_1_vs_rand2_2' rand2 1 -1 0;
estimate 'rand2_1_vs_rand2_3' rand2 1 0 -1;
ods output estimates=pairwise_estimates; /* Save estimates */
run;

 

proc mianalyze parms=pairwise_estimates;
modeleffects rand2_1_vs_rand2_2 rand2_1_vs_rand2_3 ;
run;

 

When I run the proc mianalyze, I get the following error:

ERROR: Variable PARAMETER, EFFECT, VARIABLE, PARM, or ROWNAME must be in the PARMS= data set.

 

can someone please help me understand why I am getting this error, or how I can obtain the pairwise differences?

1 REPLY 1
SAS_Rob
SAS Employee

You need to sort the Estimates data set by the label and then MIANALYZE BY LABEL to combine the results.  You should also use the DATA= input data set since it is not a data set of parameter estimates.

 

Add the following just after the GENMOD step

proc sort data=pairwise_estimates;;
by label _imputation_;
run;

proc mianalyze data=pairwise_estimates;;
by label;
modeleffects LBetaEstimate;
stderr stderr;
run;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 1 reply
  • 535 views
  • 4 likes
  • 2 in conversation