06-12-2014 06:37 PM
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;
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.
06-12-2014 07:12 PM
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.
06-19-2014 02:48 PM
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.
06-20-2014 10:08 AM
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.
06-20-2014 10:25 AM
Well, if they did that consistently across procedures, I guess half of the traffic in this forum would disappear :smileymischief:
06-20-2014 10:38 AM
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.