Logistic Regression Analysis of Bank Marketing Data
Logistic Regression Analysis of Bank Marketing Data
Converting variables into factors during the data preparation process is essential for handling categorical data types efficiently in statistical modeling. Factors allow categorical variables to be recognized as distinct categories within analysis software, facilitating appropriate interpretation and analysis. In the logistic regression analysis, this conversion ensures that categories such as job, marital status, or education are appropriately incorporated as distinct levels within the model framework. This impacts the regression analysis by enabling the model to interact correctly with categorical predictors, contributing to a robust and interpretable model structure .
The primary goal of logistic regression in a business analytics project is to describe the relationship between a dependent binary variable and a set of explanatory variables, ultimately generating a prediction model. Specifically, it is used to predict whether a client will subscribe to a term deposit (the dependent binary variable) based on independent variables such as age, job, marital status, education, default status, balance, housing, loan status, contact method, day, month, duration, campaign, pdays, previous contacts, and poutcome. Two fundamental assumptions of logistic regression include: 1) the logarithm of the odds of the dependent variable is a linear function of its explanatory variables, and 2) the sample proportions reflect equivalent probabilities in the population of interest .
ANOVA (Analysis of Variance) was used with the Chi-Square as a reference to confirm which logistic regression model was best between Mod2BM and Mod4BM. The p-value obtained for Mod2BM was 0.14814, while Mod4BM had a p-value of 0.02685, indicating that Mod4BM was the better model .
The key numeric variables analyzed in the dataset were Age, Balance (average yearly balance, in euros), Day (last contact day of the month), Duration (last contact duration), Campaign (number of contacts performed in the campaign for one specific client), Pdays (days since the last contact from a previous campaign), and Previous (number of contacts performed before the current campaign). Insights drawn from these analyses indicated that the typical client is 39 years old, has an average balance of 1423 euros, and is contacted approximately 2.794 times during the campaign. Most clients had not been contacted previously in the campaign, as Pdays median value was -1 and Previous value was 0 .
The Akaike Information Criterion (AIC) was used as a measure of the relative quality of logistic regression models. Initially, Mod1BM included all explanatory variables and had an AIC of 2259.651, but it was deemed inefficient due to high proof values. Subsequent models were refined using the stepwise algorithm to lower AIC values, indicating improved model quality. Mod2BM had a reduced AIC of 2249.5. After re-estimation by removing variables with high proof values, Mod3BM and Mod4BM were developed with respective AICs of 2590.5 and 2593.7. Although Mod4BM had a slightly higher AIC than Mod3BM, its fewer variables deemed it preferable according to the model assessment objectives .
To improve the logistic regression model, initial adjustments included using the stepwise algorithm to remove variables with high proof values, which resulted in a lower AIC value and indicated a higher relative quality. Further adjustments involved re-estimating the model by removing additional variables like education, contact, month, and poutcome, among others. These iterations were aimed at reducing proof values to below 0.1 and further refining the model to achieve a balance between model complexity and explanatory power. Ultimately, Mod4BM, even with a marginally higher AIC than Mod3BM, was preferred for its fewer explanatory variables, demonstrating a streamlined approach without significant loss of model fit .
The McFadden R^2 Index was used to assess the model fit for the logistic regression analysis in the absence of a traditional R^2 measure. For the models developed, the McFadden R^2 Index value was calculated to be 0.200352, helping to gauge the model fit in the context of predicting client subscription behavior to bank term deposits .
Conducting a descriptive analysis of numeric variables is pivotal in providing an initial understanding of the dataset's basic features. This type of analysis involves calculating statistics such as the mean, median, standard deviation, and interquartile range, which help summarize the central tendency, dispersion, and shape of the data distribution. For example, analyzing variables like age, balance, and contact duration unveils patterns such as average client characteristics and variabilities, informing subsequent modeling strategies. In the context of this project, it provides foundational insights into client behavior and marketing campaign effectiveness, which is crucial for constructing meaningful regression models and drawing informed conclusions .
The standard deviation and interquartile range were calculated for the numeric variables to assess the dispersion and variability within the data. These statistical measures help identify how spread out the data points are around the mean, supporting accurate statistical modeling and analysis. In this dataset, the variables Balance and Duration showed high dispersion, indicating significant variability in client balances and contact durations within the bank's marketing campaign data .
Logistic regression allows for the prediction of new values by using the results obtained from analyzing the relationship between explanatory variables and the binary dependent variable. In the context of the project, it facilitates predicting whether a client will subscribe to a bank term deposit based on values of variables such as age, job, marital status, and others. This ability to make predictions is advantageous for crafting targeted marketing strategies and understanding customer behavior .