DATA Step, Macro, Functions and more

Automated Model Selection Question

Not applicable
Posts: 0

Automated Model Selection Question

Sorry, if this isn't the right place to ask this. I'm somewhat new to SAS and not much of a programmer, so I was a bit lost in deciding where this topic should go...

With Automated Model Selection (best subsets, forward selection, etc.), I'm having trouble with datasets that have higher order terms or terms created after multiplying other terms. How can I manipulate SAS into taking these variables into consideration? (ie, if Variable 'x' discarded in backwards elimination, then it has to discard Variable 'x^2' and Variable 'x*y')
Trusted Advisor
Posts: 2,125

Re: Automated Model Selection Question

Posted in reply to deleted_user
Welcome to the forum. "Procedures" may be a better place, but this is fine.

Unfortunately, the SAS procedures that do automated selection don't recognize the higher order terms. You end up having to do the model selection manually (say with GLM rather than REG).

I would generally take a backward elimination approach. If there are several higher order terms, then I'd do a 'chunk test' to look at a bunch of them at once (e.g. If I have 5 squares, I'd do one model with them in and one model with them out and build the f-test with 5 d.f. from the two models.) to reduce my multiple comparisons risks. Ditto the interaction terms. If someone else has reported that a particular higher order term is important, I might test that one individually to see if it holds in my data.

Doc Muhlbaier
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation