Market Response Models (MRM) – Logistic
regression
A market response model (MRM) that predicts a binary outcome uses logistic regression, as opposed to
a linear regression, which has a continuous outcome variable.
1. Summarizing Past Behavior (RFM Analysis)
Define RFM metrics: These are essential indicators of customer behavior.
Recency: Calculate how recently a customer made a purchase.
o Example: Recency = 13 - Last purchase month
Frequency: Count how many times a customer made a purchase.
Monetary Value: Calculate the average spending per customer.
Group by customer ID and summarize data for each metric. Once you calculate the RFM metrics for each
customer, you summarize all their purchasing activity from Year 1 into just one row per customer. Now,
instead of dealing with a large, messy dataset with multiple transactions per customer, you have a clean
summary: one row per customer, showing how often they bought something, how much they typically
spent, and how recently they made their last purchase.
2. Create Target Variable (Year 2 Purchase)
Integrate dependent variable: Add a column to the newly created dataframe (where metrics for each
customer are summarized row-by-row) that measures the dependent variable. In the case of measuring
yearly returning customers, this column could hold a value of ‘0’ when the customer has not made a
purchase in year 2, and ‘1’ if the customer has. This binary variable becomes your dependent variable in
the logistic regression.
3. Model Building - Baseline Logistic Regression
Create a baseline model: This model does not use any predictors (RFM metrics) yet, it only includes the
intercept. It assumes that every customer has the same probability of making a purchase in Year 2.
Purpose of the baseline model: It serves as a reference point to compare with more complex
models that will include the RFM metrics. This helps us understand how much better our
predictions become when we use customer-specific information.
Why it's important: By fitting the baseline model first, we establish a starting point. When we add
the RFM variables later, we want to see an improvement in prediction accuracy, showing that
customer behavior data helps us better predict future purchases.
4. Model Building - Add Predictors
Build a full logistic regression model: Include independent variables such as Recency, Frequency, and
Monetary Value.
Example: glm(Year_2_Purchase ~ Recency + Frequency + Monetary_Value, family = 'binomial')
regression
A market response model (MRM) that predicts a binary outcome uses logistic regression, as opposed to
a linear regression, which has a continuous outcome variable.
1. Summarizing Past Behavior (RFM Analysis)
Define RFM metrics: These are essential indicators of customer behavior.
Recency: Calculate how recently a customer made a purchase.
o Example: Recency = 13 - Last purchase month
Frequency: Count how many times a customer made a purchase.
Monetary Value: Calculate the average spending per customer.
Group by customer ID and summarize data for each metric. Once you calculate the RFM metrics for each
customer, you summarize all their purchasing activity from Year 1 into just one row per customer. Now,
instead of dealing with a large, messy dataset with multiple transactions per customer, you have a clean
summary: one row per customer, showing how often they bought something, how much they typically
spent, and how recently they made their last purchase.
2. Create Target Variable (Year 2 Purchase)
Integrate dependent variable: Add a column to the newly created dataframe (where metrics for each
customer are summarized row-by-row) that measures the dependent variable. In the case of measuring
yearly returning customers, this column could hold a value of ‘0’ when the customer has not made a
purchase in year 2, and ‘1’ if the customer has. This binary variable becomes your dependent variable in
the logistic regression.
3. Model Building - Baseline Logistic Regression
Create a baseline model: This model does not use any predictors (RFM metrics) yet, it only includes the
intercept. It assumes that every customer has the same probability of making a purchase in Year 2.
Purpose of the baseline model: It serves as a reference point to compare with more complex
models that will include the RFM metrics. This helps us understand how much better our
predictions become when we use customer-specific information.
Why it's important: By fitting the baseline model first, we establish a starting point. When we add
the RFM variables later, we want to see an improvement in prediction accuracy, showing that
customer behavior data helps us better predict future purchases.
4. Model Building - Add Predictors
Build a full logistic regression model: Include independent variables such as Recency, Frequency, and
Monetary Value.
Example: glm(Year_2_Purchase ~ Recency + Frequency + Monetary_Value, family = 'binomial')