BookmarkSubscribeRSS Feed
jawon
Fluorite | Level 6
This is more a general regression question than specific to sas procs...

Let's say I'm trying to create a model that predicts how much my customers are likely to spend at my store. But looking at my existing customers, I have a hunch that customers who have bought product X are different than those who have bought product Y.

In other words, if I were to build a model from product X customers, the final variables and coefficients could be very different from the model built from product Y customers.

Do I have to build a separate model for each customer segment and somehow blend the results? Or is there a way to build one model that somehow factors in the differences?
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
In the classic regression sense, you can do this with interaction terms in one model.

As a concrete example, say that X=baby diapers and Y=Viagra. So, you'd expect X-people to be mostly younger and female and the Y-people to be mostly older and male. If X and Y are 0/1 coded, a model might look something like

$$spent = age sex x y age*x age*y sex*x sex*y

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

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
  • 1 reply
  • 1712 views
  • 0 likes
  • 2 in conversation