BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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')
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
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
Duke

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

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 970 views
  • 0 likes
  • 2 in conversation