BookmarkSubscribeRSS Feed
Haris
Lapis Lazuli | Level 10

Can't find anything in SAS Documentation about this error.  What does it even mean?

Here's the PROC LOGISTIC that gives the error:

proc logistic data=AnalyzeData desc;

  class Covar11 Covar12;

  model Outcome= Covar1*Covar2 ... Covar40

  / Selection=stepwise Include=1 SLStay=.2 SLEntry=.2

           LackFit NoDummyPrint RSquare;

run;

Note that the first argument is an interaction term.  Removing the interaction from the covariate list or switching the selection method to BACKWARD eliminates the problem.

9 REPLIES 9
stat_sas
Ammonite | Level 13

Hi,

The INCLUDE option directs PROC LOGISTIC to keep the first variable listed in the MODEL Statement in every model it creates during execution of this task. Covar1 appears as a covariate with Covar2. Try putting like Covar1 Covar1*Covar2....may solve the problem.

Haris
Lapis Lazuli | Level 10

I want to force the interaction, not Covar1.  BTW, replacing the string 'Covar1*Covar2' with 'Covar1|Covar2' also eliminates the error.  Even though the INCLUDE=1 statements specifies only 1 variable, all three components of the Covar1|Covar2 get forced into the model.  This happens to be what I want in this particular case, but what if I only wanted to force the multiplicative term? 


I still don't understand what Hierarchy is violated.  Do the simple effects of the interaction term have to be in the model for it to run?  I can see how that makes sense statistically but not from the strict programming point of view.

SteveDenham
Jade | Level 19

In fact, the simple effects of the interaction term MUST be in the model, using the algorithms that SAS implements for model selection. See the HIERARCHY option for details, where HIERARCHY=SINGLE is given as the default. HIERARCHY=NONE ought to set things so that it would include the interaction but not the simple effects.

Steve Denham

Haris
Lapis Lazuli | Level 10

Thanks!  It would be helpful if SAS included the reference to the HIERARCHY option in the error message.

SteveDenham
Jade | Level 19

Well, if they did that consistently across procedures, I guess half of the traffic in this forum would disappear :smileymischief:

Steve Denham

Haris
Lapis Lazuli | Level 10

You're right, Steve.  What would we do then?  Actual work!?!?!:smileyshocked:

SteveDenham
Jade | Level 19

This is what I do while PROC GLIMMIX is running

And running

And running

Steve Denham

Haris
Lapis Lazuli | Level 10

I recommend that you switch to PROC NLMIXED.  You'll have a lot more time for this Smiley Happy

SteveDenham
Jade | Level 19

I have tried.  I usually spend a lot more time writing code with NLMIXED, so I can't just set something up and let it cook for a couple of hours.

I was afraid you were going to point me at MCMC... (or even scarier point MCMC at me.

Oh yeah, one other thing.  Stopping Stepwise by Flom and Cassell.

Steve Denham

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 9 replies
  • 2895 views
  • 4 likes
  • 3 in conversation