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

 

I imputed some survival data and want to get a pooled estimate for the interaction term included in the following model. The PROC PHREG model runs fine, and the interaction is statistically significant. The PROC MIANALYZE runs perfectly fine without the interaction term included. When I run the PROC MIANALYZE with the interaction term, it draws the following error: 

 

"ERROR: The model effect derived with the specified CLASS statement, new_surgery1*timetrying, is not in the PARMS= data set. One likely reason is the variable ordering in the CLASS statement is not the same as the specified CLASS variable ordering in the procedure that creates the data set."
 
I have confirmed that the variable ordering in the CLASS statement is the same. How can I get a pooled estimate for the interaction term? Here is my code:
 
 

proc phreg data = mi;
class new_surgery1 (ref = "0") timetrying (ref = "0") prevpreg_cl (ref="1") prev_treat (ref="0")/PARAM=REF;
model (start1,stop1)*censored(1) = new_surgery1 timetrying prevpreg_cl prev_treat new_age_at_consent new_surgery1*timetrying/ ties=efron rl;
by _imputation_;
ods output ParameterEstimates=a_preg;
HAZARDRATIO NEW_SURGERY1;
run;

 

proc mianalyze parms(classvar=ClassVal)=a_preg;
class new_surgery1 timetrying prevpreg_cl prev_treat;
modeleffects new_surgery1 timetrying prevpreg_cl prev_treat new_age_at_consent TIMETRYING*NEW_SURGERY1;
run;

 

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Seth10
Fluorite | Level 6

Thanks for your response! 

 

I actually just discovered in the output dataset that SAS shortened the interaction name to timetryin*new_surgery1. I included the new name in the PROC MIANALYZE and it worked. 

View solution in original post

3 REPLIES 3
SteveDenham
Jade | Level 19

Could it be as simple as the variable is called "new_surgery1*timetrying" in the MODEL statement for PHREG, but is called "TIMETRYING*NEW_SURGERY1" in the MODELEFFECTS statement for MIANALYZE? MIANALYZE can be picky about things like the variables not having identical names (including case on occastion).

 

SteveDenham

Seth10
Fluorite | Level 6

Thanks for your response! 

 

I actually just discovered in the output dataset that SAS shortened the interaction name to timetryin*new_surgery1. I included the new name in the PROC MIANALYZE and it worked. 

SAS_Rob
SAS Employee
You could also use the NAMELEN= option on the PHREG statement to keep it from truncating the names of the effects.

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
  • 3 replies
  • 534 views
  • 1 like
  • 3 in conversation