Hi.
I'm Andrew Christian, Principle Solutions Architect
for Advanced Analytics at SAS.
Today, I'm going to share a demonstration using SAS Visual
Statistics on building a logistic regression
model for a mobile telecommunications company.
The business use case we are focusing on
is to identify which of their customers
will make good candidates for the upcoming
cross-sell upsell marketing campaign.
From the SAS home page, I select Explore and Visualize Data.
I select Data and point to a data set.
We're going to select our cross-sell upsell data
and click OK.
On the left-hand side, we see all of the columns in the data.
Notice that our target variable, cross-sell upsell flag,
is located among the measures.
We want to convert that into a categorical variable.
We right-click and Convert to Category.
We also want to partition our data
into two samples, one for model training
and the other for model validation.
To create this partition, click on the data
set icon and select Add Data Partition Item.
Fill in the percentage amount we'd like to use for training.
We're going to use 70% for training, which
leaves us 30% for validation.
And we click OK.
We can now see our new partition column among our data.
Also on the left-hand side we see our Objects tab.
It is here we will select a logistic regression.
We scroll down to SAS Visual Statistics
and drag Logistic Regression into the visualization window.
On the right-hand side, we select our Roles tab,
and we fill in the necessary variables.
We will choose cross-sell upsell flag
as our response variable, partition as our Partition ID,
credit class as our Classification Effect,
and we will select a number of Continuous Effects.
Once we've selected all of our effects, we click OK.
Let's change our model selection to Validation Misclassification
Rate.
Also, notice how many observations
were used in the model and how many were not.
It appears that we have a few columns that
contain missing values.
Click on the Options tab to correct for that.
Click on the Informative Missing box
to automatically create a dummy variable that indicates
if a column has missing values.
Notice the difference when we do.
For our selection method, we are going
to use backward, which includes all variables in the first step
and removes them one by one until the process is complete.
Right-click on the Lift chart to choose another graph like ROC.
We can see that we're getting very good results
from our model.
Now since this is a cross-sell upsell campaign,
we've decided that we really should
model based on the age of the customer's handset.
So we go back to our Roles tab.
And we select Handset Age Group as our Group By variable.
What we see now are three different models with
a composite misclassification rate of 0896.
The Fit Summary shows the different misclassification
rates per group as well as the variables
that contributed to each model.
The green color indicates variables
that were used in each model.
If I select the group, greater than 48 months,
you can see that it's misclassification rate is 0618.
The other graphs also update to show the residuals
and lift charts for that specific model.
If we wanted to go deeper, simply
click on the expanded menu where you can see options
for exporting model data, exporting model score code,
deriving predicted variables, or changing
the model to another algorithm.
You've just seen how we can build a logistic regression
model for a cross-sell upsell campaign using
a group by variable.
Thanks for watching.